简体   繁体   中英

How to drop the index column of DataFrame?

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!

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))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM