Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    df3.to_csv('example.csv', sep=',', index=False) Commented Apr 8, 2018 at 17:07
  • Perhaps the better approach is .append(), but based on the docs that doens't seem like the right approach. Commented Apr 8, 2018 at 17:07
  • @roganjosh - that worked... I now see that the index= has several variables. I now understand that the extra column is the index column from the original dataframe. So I could also .read_csv() with index=0 and that puts the Unnamed: column to the df's index. Right? Commented Apr 8, 2018 at 17:11
  • From what I can tell, you will no-longer have Unnamed: as a column. The to_csv method will write a numerical index for each row unless you specify it as False. Commented Apr 8, 2018 at 17:16