TypeError: Can only append a dict if ignore_index=True

46

import pandas as pd
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'), index=['x', 'y'])
dict_ ={"A":5,"B":9}
df =df.append(dict_,ignore_index=True)
print(df)

Comments

Submit
0 Comments