pandas drop columns if exists code example Example: is coumn exist then delete in datafrmae if 'A' in df.columns: del df['A']