79402975

Date: 2025-01-31 14:08:57
Score: 0.5
Natty:
Report link

You can try this: df['IncrValue'] = df.groupby(['Var1', 'Var2', 'Var3', 'Var4'])['CumValue'].diff().fillna(0)

print(df)

Reasons:
  • Whitelisted phrase (-2): try this:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: user29382901