79255035

Date: 2024-12-05 14:18:00
Score: 0.5
Natty:
Report link

You need to convert Series to DataFrame, first. I think, this will work:

df_new = df_agg.to_frame().reset_index()

Also, inplace=True flag is used to modify DataFrame without assignment, like:

df_new = df_agg.to_frame()
df_new.reset_index(inplace=True)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nikolai Zaitsev