【发布时间】:2018-10-23 06:08:06
【问题描述】:
在下面的代码中,只绘制了plot,但没有打印head,为什么?
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("file.csv")
df.set_index("id", inplace=True)
plt.plot(df)
plt.show() # this draws plof of entire df form csv
print(df.head(10)) # this does not print the first 10 rows of the dataframe
【问题讨论】:
-
不知道懂不懂,需要
print(df. head())吗?
标签: python pandas matplotlib pycharm