DataFrame.unstack() issues DeprecationWarning with MultiIndex (original) (raw)
import warnings warnings.simplefilter('error')
import pandas as pd pd.version u'0.17.0rc1'
df = pd.DataFrame({'A': list('aabb'), 'B': [0, 1, 0, 1], 'C': range(4)}) gf = df.groupby(['A', 'B']).sum() gf C A B
a 0 0 1 1 b 0 2 1 3
gf.unstack() Traceback (most recent call last): ..., line 4274, in _reference_duplicate_name return np.sum(name == np.asarray(self.names)) > 1 DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.