【发布时间】:2023-03-07 04:43:01
【问题描述】:
我在 jupypter 笔记本中有以下代码:
# (1) How to add a new column?
test_csv['aggregator'] = None
print (test_csv)
# (2) How to remove a column?
test_csv.drop(columns=['platform'])
它打印以下内容:
为什么第二个语句是表格格式(没有print 语句),而第一个只是文本数据?有没有办法强制打印格式 DataFrame 并应用格式良好的表格?
【问题讨论】:
标签: python pandas dataframe jupyter-notebook google-colaboratory