title: I have a dataframe of two columns, "PID7' and "ideo5" .I want to find the count of individual combinations between the two columns
body: <p>I have a dataframe of two columns, &quot;PID7' and &quot;ideo5&quot; .I want to find the count of individual combinations between the two columns.</p>
  <p>pid7 ideo5
  1      6     3
  2      2     2
  3      2     3
  4      6     3
  ....</p>
  <p>for example I want to find the count of combination of pid7 and ideo5,eg pid7:6 and ideo5:3 has a count of 2 , pid7:2 and ideo5:2 has a count of 1, pid:2 and ideo5:3 has a count of 1 and so on..
  This would be needed to draw a graph like as following which would show the count of PID7 based on ideo5.
  The graph would show PID7 and IDEO5 as 2 and so on ina bar chart.</p>
  <p><img src="https://i.stack.imgur.com/T9OSd.png" alt="enter image description here" /></p>