title: Pandas: How to get Unique combinations of two column values in either ways?
body: <p>I would like to know how we can get the unique combination of two column values if the values are in a similar combination. Below is the dataframe</p>
  <p><a href="https://i.stack.imgur.com/NSW1b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NSW1b.png" alt="" /></a></p>
  <p>I tried using below code but my expected output is different</p>
  <p>df.groupby(['column1', 'column2'], as_index = False).agg({'expense' : 'sum'})</p>