我想打印整个数据框,但我不想打印索引
另外,一列是日期时间类型,我只想打印时间,而不是日期。
数据框如下所示:
User ID Enter Time Activity Number
0 123 2014-07-08 00:09:00 1411
1 123 2014-07-08 00:18:00 893
2 123 2014-07-08 00:49:00 1041
我希望它打印为
User ID Enter Time Activity Number
123 00:09:00 1411
123 00:18:00 893
123 00:49:00 1041
最佳答案
print(df.to_string(index=False))
关于python - 如何打印没有索引的 Pandas 数据框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24644656/