wine.drop(wine.columns[2,4,7,9,11,12], axis=1, inplace= True)
while performing this I am getting error
as too many indices for array: array is 1-dimensional, but 6 were indexed
Please help why its happening
wine.drop(wine.columns[2,4,7,9,11,12], axis=1, inplace= True)
while performing this I am getting error
as too many indices for array: array is 1-dimensional, but 6 were indexed
Please help why its happening
You can use iloc to index columns by integer indexes:
df1.drop(df1.iloc[:, [2,4,7,9,11,12]], axis=1, inplace=True)