【问题标题】:How to drop the index column of DataFrame?如何删除DataFrame的索引列?
【发布时间】:2014-09-11 16:25:39
【问题描述】:

我想去掉 Pandas DataFrame 默认打印的索引列。这可能吗?

感谢您的帮助!

【问题讨论】:

标签: python pandas indexing dataframe multiple-columns


【解决方案1】:

正如@EdChum 所指出的,不确定默认情况下是否有任何方法可以做到这一点。出于显示目的,您可以这样做:

print(df.to_string(index=False))

【讨论】:

    猜你喜欢
    • 2023-04-05
    • 2018-07-04
    • 2017-03-25
    • 2021-08-14
    • 2016-09-17
    • 1970-01-01
    • 2019-01-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多