title: Apply custom zscore function inplace to pandas dataframe?
body: <p>I want to apply my custom zscore function on rows of a pandas DataFrame df grouped by MonthNumber column:</p>
  <pre><code>def compure_z_score(df, columns):
      # apply the z-score method
      for column in columns:
          df[column] = (df[column] - df[column].mean()) / df[column].std(ddof=0)
          
      #return df
  
  months = df['MonthNumber'].unique().tolist()
  columns = ['T_AROME', 'T_ARPEGE']
  for month in months:
      compure_z_score(df.query(&quot;MonthNumber == @month&quot;), columns)
      
  </code></pre>
  <p>But I would like to apply compure_z_score() function to df inplace like C function with reference function call?</p>
  <p>Thanks.</p>