Answers for "python df.shape[0]"

4

df.shape 0

count_row = df.shape[0]  # gives number of row count
count_col = df.shape[1]  # gives number of col count
Posted by: Guest on May-25-2020
0

python dataframe shape

print(df.shape)
# (891, 12)

print(df.shape[0])
# 891

print(df.shape[1])
# 12
Posted by: Guest on November-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language