SNIPPET
5 Upvotes

Quick Exploration of a Pandas DataFrame

Python
Visualisation & EDA

4 methods for quick exploration of a pandas dataframe.

#Shape of the dataframe
df.shape

#Looks at the first 5 rows
df.head()

#Explore the dataframe metadata including non-nulls rows and data types
df.info()

#Get statistical summary of the dataframe columns
df.describe()

By GregHe1979 - Last Updated Dec. 12, 2020, 5:53 p.m.

COMMENTS
RELATED SNIPPETS
2
Search Snippets by Tag: