Snippets Collections
# 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)
# Split the dataset 2 parts that categorical and numerical

print("Categorical Features:",cat_col,sep="\n\n")
print("Numerical Features:",num_col,sep="\n\n")

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension