Column Removal Methods¶
CRM-1: del statement¶
del df['A']
Not Supported
CRM-2: drop method¶
df = df.drop('A', axis=1)
Not Supported
CRM-3: drop with columns¶
df = df.drop(columns=['A', 'B'])
Not Supported
CRM-4: drop multiple¶
df = df.drop(['A','B'], axis=1)
Not Supported
CRM-5: pop method¶
removed = df.pop('A')
Not Supported
CRM-6: Assign None¶
df = df.assign(col=None)
Not Supported
CRM-7: Select subset¶
df = df[['A', 'B']]
Not Supported
CRM-8: loc selection¶
df = df.loc[:, ['A', 'B']]
Not Supported
CRM-9: iloc selection¶
df = df.iloc[:, [0, 1]]
Not Supported
CRM-10: Boolean mask¶
df = df.loc[:, ~df.columns.str.startswith('temp')]
Not Supported
CRM-11: filter method¶
df = df.filter(regex='^[AB]')
Not Supported
CRM-12: drop_duplicates¶
df = df.T.drop_duplicates().T
Not Supported
CRM-13: reindex¶
df = df.reindex(columns=['A','B'])
Not Supported