获取DataFrame的行数和列数

df.shape[0]  # 获取行数
df.shape[1]  # 获取列数

 

posted @ 2022-06-10 14:20  OTAKU_nicole  阅读(169)  评论(0)    收藏  举报