# Get the Numerical Data list to infer distribution plots
numerical = [var for var in df.columns if df[var].dtype!='O']
print('There are {} numerical variables\n'.format(len(numerical)))
print('The numerical variables are :', numerical)
# Get the Categorical Data list to infer distribution plots
categorical = [var for var in df.columns if df[var].dtype =='O']
print('There are {} Categorical variables\n'.format(len(categorical)))
print('The Categorical variables are :', categorical)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter