Snippets Collections
# Split the dataset 2 parts that categorical and numerical

cat_col=list(df1.select_dtypes(include="object").columns)
num_col=list(df1.select_dtypes(exclude="object").columns)
print("Categorical Features:",cat_col,sep="\n\n")
print("")
print("Numerical Features:",num_col,sep="\n\n")
star

Mon Jan 25 2021 07:21:19 GMT+0000 (Coordinated Universal Time)

#splitting #numerical #categorical

Save snippets that work with our extensions

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