title: How to Create new columns using other column Values in Python?
body: <p>I need to create a column <code>Period_Subcategory</code> based on other columns' values: a dictionary of {<code>Period</code> value: [list of <code>Sub_Category</code> values...]}</p>
  <p>Input <code>df</code>:</p>
  <pre><code>Period   Category    Sub_Category
  FY18Q1   Clothing    Shirt    
  FY18Q2   Clothing    Trouser
  FY18Q1   Clothing    Shirt
  FY18Q3   Clothing    Pant 
  FY18Q1   Accessories Watch
  FY18Q2   Accessories Muff
  FY18Q2   Accessories Watch
  FY18Q3   Accessories Chains
  </code></pre>
  <p>Desired output <code>df_output</code>:</p>
  <pre><code>Category    Period_Subcategory
  Clothing    {'FY18Q1':'Shirt','FY18Q2':'Trouser','FY18Q3':'Pant'}
  Accessories {'FY18Q1':'Watch','FY18Q2':['muff','Watch'],'FY18Q3':'Chains'}
  </code></pre>