Skip to content

Commit

Permalink
Don't convert the index columns produced by Pandas.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matz-e committed Nov 15, 2024
1 parent e176859 commit 257bac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/circuit/sonata_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace arrow;
using namespace std;


static const unordered_set<string> COLUMNS_TO_SKIP{"synapse_id"};
static const unordered_set<string> COLUMNS_TO_SKIP{"synapse_id", "__index_level_0__"};


SonataWriter::SonataWriter(const string & filepath,
Expand Down

0 comments on commit 257bac4

Please sign in to comment.