pandas: 获取Dataframe的行数和列数

返回列数:

df.shape[1]

返回行数:

df.shape[0]   或者:len(df)

返回形状,即几行几列的数组

dataframe.shape()

猜你喜欢

转载自blog.csdn.net/weixin_48135624/article/details/114341930