0

I want to get rid of the index column that the Pandas DataFrame prints out in default. Is this possible?

Thank you for your help!

1
  • There is no display option I can find that can do this: pandas.pydata.org/pandas-docs/stable/generated/…, you could do print(df.values) but this outputs a numpy array without the column names so not that readable Commented Jul 21, 2014 at 8:31

1 Answer 1

1

As @EdChum noted, not sure there's any way to do this by default. For display purposes, you could do:

print(df.to_string(index=False))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.