df
The dimensions of the dataset.
df.shape
The number of rows in the DataFrame.
len(df)
The number of rows times number of columns.
df.size
Number of dimensions of the dataset.
df.ndim
Summary statistics for the numerical columns (transposed for more readable output).
df.describe(include=[np.number]).T
Summary stats for object and categorical columns (transposed for more readable output).
df.describe(include=[np.object, pd.Categorical]).T
Count of non null values.
df.count()
df['bar'].value_counts()
Number of distinct values in a column.
df['bar'].nunique()
df.min()
List the index dtype and columns, non-null values and memory usage of the DataFrame.
df.info()
Memory usage of each column.
df.memory_usage(deep=True)
df['foo'] = df['foo'].astype('category')
df['bar'] = df['bar'].astype('category')
df['baz'] = df['baz'].astype(np.int8)
df.memory_usage(deep=True)
df.memory_usage(deep=True)
df
df.info()