'How to create columns in the same dataset Pandas?

I extract data from column using:

df_filtered = pd.DataFrame(df[1].apply(extractMMYY).tolist(), columns=['MM', 'YY'])

It returns me a new dataset, but I need to return MM, YY into initial dataset df.

I have tried:

df(df[1].apply(extractMMYY).tolist(), columns=['MM', 'YY'])

Or I need to bins two datasets to be able filter first df by df_filtered



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source