Home > Mobile >  How to set missing value in dataframe.csv(sys.stdout, na_rep='NULL') for the first row of
How to set missing value in dataframe.csv(sys.stdout, na_rep='NULL') for the first row of

Time:12-20

Set missing value

Tried data.to_csv(sys.stdout,na_rep='NULL') but it doesnt apply to first row

CodePudding user response:

That's your index's name - it cannot be ignored.

Set index name instead using df.index.name = 'yourname' or remove the index from the to_csv using df.to_csv(index=False)

  • Related