Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Created January 27, 2019 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillKoehrsen/259be015165dde8006408a9a4c35edf4 to your computer and use it in GitHub Desktop.
Save WillKoehrsen/259be015165dde8006408a9a4c35edf4 to your computer and use it in GitHub Desktop.
# Correlation between two columns with dropdown
@interact
def correlations(column1=list(df.select_dtypes('number').columns),
column2=list(df.select_dtypes('number').columns)):
print(f"Correlation: {df[column1].corr(df[column2])}")
# Stats of a column with dropdown
@interact
def describe(column=list(df.columns)):
print(df[column].describe())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment