title: In the pivot table, how to add an index and value as the same column of a dataframe
body: <p>In the dataset I have four columns : date, email, region and event. I need to find the distinct count of dates for a particular date the event has been taken place. I executed this :</p>
  <pre><code>data = pd.pivot_table(data, values = 'date', index = ['date','email','region'], columns = 'event', aggfunc = pd.Series.nunique)
  </code></pre>
  <p>but it throws an error,
  <code>ValueError: Grouper for 'date' not 1-dimensional</code></p>
  <p>I was actually imitating an excel process where we can put a column in rows as well as values easily. so it is exactly what I want to accomplish.</p>