Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 68a5788

Browse files
authored
Don't convert the index columns produced by Pandas. (#9)
If scientists write Parquet files with Pandas, via `DataFrame.to_parquet`, they will have to add `index=False` to skip writing the index to disk, too. In the most simple and common case, this index will show up as an additional column `__index_level_0__` and end up in the edge files. Make scientists and our lives a little simpler and skip converting this index column.
1 parent e176859 commit 68a5788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/circuit/sonata_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ using namespace arrow;
2626
using namespace std;
2727

2828

29-
static const unordered_set<string> COLUMNS_TO_SKIP{"synapse_id"};
29+
static const unordered_set<string> COLUMNS_TO_SKIP{"synapse_id", "__index_level_0__"};
3030

3131

3232
SonataWriter::SonataWriter(const string & filepath,

0 commit comments

Comments
 (0)