You can use the following line of code
pd.DataFrame({'df1': df1.shape, 'df2': df2.shape, 'df3': df3.shape}, index=['rows', 'columns'])
import pandas as pd
import seaborn as sns
df1 = sns.load_dataset('iris')
df2 = sns.load_dataset('titanic')
df3 = sns.load_dataset('mpg')
pd.DataFrame({'df1': df1.shape, 'df2': df2.shape, 'df3': df3.shape}, index=['rows', 'columns'])
# df1 df2 df3
# rows 150 891 398
# columns 5 15 9
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.