---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-7-1df4a16e9afd> in <module>
----> 1 df.pivot(index='s1', columns='s2', values='s3')
~\Anaconda3\lib\site-packages\pandas\core\frame.py in pivot(self, index, columns, values)
5917 from pandas.core.reshape.pivot import pivot
5918
-> 5919 return pivot(self, index=index, columns=columns, values=values)
5920
5921 _shared_docs[
~\Anaconda3\lib\site-packages\pandas\core\reshape\pivot.py in pivot(data, index, columns, values)
428 else:
429 indexed = data._constructor_sliced(data[values].values, index=index)
--> 430 return indexed.unstack(columns)
431
432
~\Anaconda3\lib\site-packages\pandas\core\series.py in unstack(self, level, fill_value)
3743 from pandas.core.reshape.reshape import unstack
3744
-> 3745 return unstack(self, level, fill_value)
3746
3747 # ----------------------------------------------------------------------
~\Anaconda3\lib\site-packages\pandas\core\reshape\reshape.py in unstack(obj, level, fill_value)
421 level=level,
422 fill_value=fill_value,
--> 423 constructor=obj._constructor_expanddim,
424 )
425 return unstacker.get_result()
~\Anaconda3\lib\site-packages\pandas\core\reshape\reshape.py in __init__(self, values, index, level, value_columns, fill_value, constructor)
140
141 self._make_sorted_values_labels()
--> 142 self._make_selectors()
143
144 def _make_sorted_values_labels(self):
~\Anaconda3\lib\site-packages\pandas\core\reshape\reshape.py in _make_selectors(self)
178
179 if mask.sum() < len(self.index):
--> 180 raise ValueError("Index contains duplicate entries, " "cannot reshape")
181
182 self.group_index = comp_index
ValueError: Index contains duplicate entries, cannot reshape