Skip to content

Instantly share code, notes, and snippets.

@Nithilaa
Created June 10, 2021 03:44
Show Gist options
  • Save Nithilaa/5cc44b3dd86fbba83b9e114937aba0a3 to your computer and use it in GitHub Desktop.
Save Nithilaa/5cc44b3dd86fbba83b9e114937aba0a3 to your computer and use it in GitHub Desktop.
drop numeric columns
df_tf_m_columns = df_tf_m.columns
df_tf_m_columns
res = [sub for sub in df_tf_m_columns if sub.isalpha()]
res.append('Flag_1')
df_tf_m = df_tf_m.drop(columns=[col for col in df_tf_m if col not in res])
df_tf_m.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment