Closed
Description
I think this is distinct from #5541 though I agree that an API change here might be helpful. AFAICT, I am using replace as 'expected', but all of the keys aren't being matched. Any idea what's going on?
d = {u'fname' :
{'out_augmented_AUG_2011.json' : pd.Period(year=2011, month=8, freq='M'),
'out_augmented_JAN_2011.json' : pd.Period(year=2011, month=1, freq='M'),
'out_augmented_MAY_2012.json' : pd.Period(year=2012, month=5, freq='M'),
'out_augmented_SUBSIDY_WEEK.json' : pd.Period(year=2011, month=4, freq='M'),
'out_augmented_AUG_2012.json' : pd.Period(year=2012, month=8, freq='M'),
'out_augmented_MAY_2011.json' : pd.Period(year=2011, month=5, freq='M'),
'out_augmented_SEP_2013.json' : pd.Period(year=2013, month=9, freq='M'),
}}
df = pd.DataFrame(['out_augmented_AUG_2012.json',
'out_augmented_SEP_2013.json',
'out_augmented_SUBSIDY_WEEK.json',
'out_augmented_MAY_2012.json',
'out_augmented_MAY_2011.json',
'out_augmented_AUG_2011.json',
'out_augmented_JAN_2011.json'], columns=['fname'])
df.replace(d)
On
[31]: pd.version.version
[31]: '0.13.1-753-g4614ac8'