Skip to content

Commit 6de07ba

Browse files
committed
fix field order
1 parent c9d86c7 commit 6de07ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/graphy/utils/data_extractor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ def write_csv(file_path: str, data: list, headers: list = None):
4141
for row in data:
4242
headers.update(row.keys())
4343
if headers:
44+
# some hacking messy stuff
4445
if "abstract" in headers:
4546
headers.remove("abstract")
4647
if "primary_class" in headers:
4748
headers.remove("primary_class")
4849
if "id" in headers:
4950
headers.remove("id") # Remove "id" if it's in the headers
50-
headers = ["id"] + sorted(
51+
headers.remove("node_type") # Remove "id" if it's in the headers
52+
headers = ["id", "node_type"] + sorted(
5153
list(headers)
5254
) # Add "id" to the front and sort the rest
5355
else:

0 commit comments

Comments
 (0)