title: Converting pandas data frame to dictionary in python
body: <p>My pandas dataframe (df):</p>
  
  <pre><code>Pattern      Support
  
  Bread         4
  Milk          4
  Bread,Milk    4
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>x = df.set_index('Pattern').to_dict()
  print(x)
  </code></pre>
  
  <p>Output of my code:</p>
  
  <pre><code>{'Support':{'MILK': 4,'BREAD':4, 'BREAD,MILK':4}}
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>{'MILK': 4,'BREAD':4, 'BREAD,MILK':4}
  </code></pre>
  
  <p>I do not want the name of the second column 'Support' to be the main key, just want to get the elements and the count as in the expected output. Is there any pythonic (python 3.5) way?</p>