0

I am having a data frame

df = pd.DataFrame({'B': [1, 2, 3], 'C': [4, 5, 6]})

   B  C
0  1  4
1  2  5
2  3  6

I want to hide the serial number column. How to approach?

Smruti Sahoo
  • 149
  • 1
  • 9
  • 1
    Does this answer your question? [How to print pandas DataFrame without index](https://stackoverflow.com/questions/24644656/how-to-print-pandas-dataframe-without-index) – Pablo C Jan 22 '21 at 05:08

1 Answers1

1

You can do:

print(df.to_string(index=False))
Suhas Mucherla
  • 1,383
  • 1
  • 5
  • 17