I am trying to drop the first column of a transposed DataFrame that i Import from an .xlsx-File, with df.drop(column['a']) but get the error['a'] not found in axis
I am running it in Jupyter Notebooks and Pandas-Version is 0.23.4
import pandas as pd
import numpy as np
df = pd.read_excel('C:/Users/Desktop/Test.xlsx')
df = df.set_index('a').T
df = df.reset_index()
df = df.drop(columns=['a'])
df before transpose:
' a 5 4 3 2
0 b 1 3 4 5
1 c 7 6 8 7
2 d 6 4 7 1
df after transpose and reset_index
a i b c d
0 5 1 7 6
1 4 3 6 4
2 3 4 8 7
3 2 5 7 1