Created
August 13, 2019 20:04
-
-
Save evu/d53a819914e238bf21ca825361e83573 to your computer and use it in GitHub Desktop.
My Fav Pandas ๐ผ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Summary statistics for numeric variables | |
df.describe().transpose() | |
# Summary statistics for categorical/string variables | |
df.describe(include=['O']).transpose() | |
# Info about column names, datatypes, and null values | |
df.info() | |
# Get a sample | |
df.sample(10) | |
df.username.sample(10) | |
# Frequency counts for categorical variable | |
df.state.value_counts() | |
# Count missing values for all columns / a specific column | |
df.isnull().sum() | |
df.state.isnull().sum() | |
# Get value at given quantile | |
df.upvotes.quantile(0.99) | |
# Correlation coefficient | |
df.awards.corr(df.upvotes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment