1

I have a dataframe without columns names and when I print it I get a row with numbers, how can I print without this row? I have the same problem with the index, how can I print without index and columns?

  • Does this answer your question? [How to print pandas DataFrame without index](https://stackoverflow.com/questions/24644656/how-to-print-pandas-dataframe-without-index) – Chris Jul 27 '20 at 19:50

1 Answers1

1

See the docs for some more info on using the to_string() function in pandas.

print(df.to_string(index=False))

To hide the index and the column headers:

print(df.to_string(index=False, header=False))
Henry Ecker
  • 31,792
  • 14
  • 29
  • 50
DCrowley
  • 21
  • 3