danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

to_csv does not support DataFrame indexes

Open kbzowski opened this issue 4 years ago • 3 comments

Indexes in DataFrame are not saved when exporting to csv using to_csv.

const df = new DataFrame(input, { index: ['A', 'B', 'C'] } );
df.to_csv(filename);

kbzowski avatar Sep 21 '21 13:09 kbzowski

Indexes in DataFrame are not saved when exporting to csv using to_csv.

const df = new DataFrame(input, { index: ['A', 'B', 'C'] } );
df.to_csv(filename);

Not currently supported.

risenW avatar Sep 21 '21 17:09 risenW

Is this related to #361? toJSON() also didnt't include the index.

It seems like most of the io files need an update so that Series and DataFrames include the index too.

Emporea avatar Jan 20 '22 08:01 Emporea

Is this related to #361? toJSON() also didnt't include the index.

It seems like most of the io files need an update so that Series and DataFrames include the index too.

Yes, it's similar. If you want and can, you can raise a separate PR for this.

risenW avatar Jan 20 '22 09:01 risenW