Search code examples
pythonpandasindexingrows

Remove the index rows, (not column) in python pandas


I have problem with python pandas. I need to remove the index rows (not columns)

I'm trying with this command.

data_last.to_csv (r'D:\Matkelp3.csv',index=False)

I still get the index row in the first line


Solution

  • You have to also specify header=False:

    data_last.to_csv(r'D:\Matkelp3.csv', index=False, header=False)