remove one column from a dataframe in pandas code example
Example 1: drop columns pandas
df.drop(columns=['B', 'C'])
Example 2: pandas drop columns by index
cols = [1,2,4,5,12]
df.drop(df.columns[cols],axis=1,inplace=True)
df.drop(columns=['B', 'C'])
cols = [1,2,4,5,12]
df.drop(df.columns[cols],axis=1,inplace=True)