title: Python column calculation from a different dataframe
body: <p>I need to create a df_2 with a column based on a couple of formulae. I could create multiple df's with group and merge. But is there an efficient way for achieve?</p>
  <p>given df_1 is as below,</p>
  <pre><code>df_1 = pd.DataFrame([['A', '1/1/2021','SKU_1','Customer Backhaul','34,848','$-51,100'],
                ['A', '1/1/2021','SKU_1','FOB','75,357','$12,407,112'],
                ['A', '1/1/2021','SKU_1','Price','75,357','$12,407,112'],
                ['A', '1/1/2021','SKU_1','Vendor Freight - Delivered','40,511','$65,470'],
                ['B', '1/1/2021','SKU_1','Customer Backhaul','197,904','$-157,487'],
                ['B', '1/1/2021','SKU_1','FOB','931,866','$50,059,515'],
                ['B', '1/1/2021','SKU_1','Price','931,866','$62,333,500'],
                ['B', '1/1/2021','SKU_1','Vendor Freight - Delivered','740,355','$1,220,927']], 
                columns=['Group', 'Month','ID','Cost Type','Volume','Order Cost'])
  </code></pre>
  <p>Formulae for columns in df_2 below are:</p>
  <ul>
  <li>Freight = absolute value of (Customer Backhaul) + Vendor Delivered</li>
  <li>FOB = FOB</li>
  <li>Price = Price - Customer Backhaul</li>
  <li>Volume = Volume of FOB</li>
  </ul>
  <p>df_2 is the expected result,</p>
  <pre><code>Out[df_2]
    Group   Month     ID      Cost Type   Volume    Cost
  0   A   1/1/2021    SKU_1   Freight     75,357  $116,570
  1   A   1/1/2021    SKU_1   FOB         75,357  $12,407,112
  2   A   1/1/2021    SKU_1   Price       75,357  $12,434,063
  3   B   1/1/2021    SKU_1   Freight     931,866 $1,378,414
  4   B   1/1/2021    SKU_1   FOB         931,866 $50,059,515
  5   B   1/1/2021    SKU_1   Price       931,866 $62,490,988
  </code></pre>