I have this code which runs well until this morning:
# delete rows of 2019
df.drop(df[df.month.str.contains('2019')].index, inplace=True)
df.sort_values(by=['GL', 'month'], inplace=True)
df["diffDebit"] = df.groupby('GL')['GL_Debit'].diff().fillna(df['GL_Debit'])
df["diffCredit"] = df.groupby('GL')['GL_Credit'].diff().fillna(df['GL_Credit'])
error is : ValueError: 'GL' is both an index level and a column label, which is ambiguous.
If I delete df.drop(df[df.month.str.contains('2019')].index, inplace=True)
It works again, but I need to delete these rows before. Any idea?
