title: Finding the max values of each subset in pandas
body: <p>I'm trying to divide each value by the max value for the given year.</p>
  <pre><code>df = pd.DataFrame({'Fiscal Year': {0: 2020, 1: 2019, 2: 2021, 3: 2020, 4: 2021},
   'Product Num': {0: 'widget', 1: 'doodad', 2: &quot;widget&quot;, 3: 'doodad', 4: 'widget'},
   'Value': {0: 1000, 1: 1100, 2: 900, 3: 1300, 4: 800}})
  </code></pre>
  <p>So,</p>
  <pre><code>Product  |   Year    |   New Value 
  Widget   |   2020    |   .769
  Doodad   |   2019    |     1
  Widget   |   2021    |     1
  Doodad   |   2020    |     1
  Widget   |   2021    |   .889
  </code></pre>
  <p>I know I can do groupby's and then go through each entry and figure it out that way, but that doesn't seem efficient.   Is there a better way to do this?</p>