小编Jas*_* Hu的帖子

df.head()和df.head有什么区别?

在Jupyter Notebook或终端中,df.head和df.head()都可以返回数据帧的输出,但有一些细微差别.两个不同表达式之间的根本区别是什么,以及括号在Python中一般扮演什么角色?谢谢!

>>>df.head
<bound method NDFrame.head of          Date    Open    High     Low   Close    Volume
0    1-Jun-17  153.17  153.33  152.22  153.18  16404088
1    2-Jun-17  153.58  155.45  152.89  155.45  27770715
2    5-Jun-17  154.34  154.45  153.46  153.93  25331662
3    6-Jun-17  153.90  155.81  153.78  154.45  26624926
4    7-Jun-17  155.02  155.98  154.48  155.37  21069647
5    8-Jun-17  155.25  155.54  154.40  154.99  21250798
6    9-Jun-17  155.19  155.19  146.02  148.98  64882657
7   12-Jun-17  145.74  146.09  142.51  145.42  72307330
8   13-Jun-17  147.16  147.45  145.15  146.59  34165445
9   14-Jun-17  147.50  147.50 …
Run Code Online (Sandbox Code Playgroud)

python python-3.x pandas jupyter-notebook

0
推荐指数
3
解决办法
4055
查看次数

标签 统计

jupyter-notebook ×1

pandas ×1

python ×1

python-3.x ×1