Python Pandas: dataFrame.info() throws KeyError: 0

Viewed 499

My script splits a column into two parts. Thereafter I rename the column 0.

df3=df_global['title'].str.rsplit('-', n=3, expand=True)
df3.rename(columns={0: 'Catalogue ID'}, inplace=True)

When I now type

df3.info()

it throws KeyError: 0

I renamed the columns in other dfs (df1, df2) as well and never get an error.

0 Answers
Related