#89 为什么获取行数要写len(df)/ df.shape[0],不能写 df.shape[1]呀?

Open
opened 3 years ago by 裘世唯 · 4 comments
There is no content yet.

同问同问

同问同问

df.shape[1]是指列数的,下面我写了个例子,可以参考
image

df.shape[1]是指列数的,下面我写了个例子,可以参考 ![image](/attachments/764cae99-ea5a-4323-8c9f-b9b60d5a3655)

df.shape[1]是指列数的,下面我写了个例子,可以参考
image

我的理解:.shape[]函数能获取某一维度上表格的行/列数,里面填的数据相当于axis?

> df.shape[1]是指列数的,下面我写了个例子,可以参考 > ![image](/attachments/764cae99-ea5a-4323-8c9f-b9b60d5a3655) 我的理解:.shape[]函数能获取某一维度上表格的行/列数,里面填的数据相当于axis?
裘世唯 commented 3 years ago
Poster

是相当于axis,看到len(df1)的输出是4我想通了

是相当于axis,看到len(df1)的输出是4我想通了
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.