BUG: periodindex converted to Series incorrectly getting coerce to int64 #7932

Closed
jreback opened this Issue Aug 4, 2014 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

jreback commented Aug 4, 2014

In [47]: span
Out[47]: 
<class 'pandas.tseries.period.PeriodIndex'>
[2012-12-31, ..., 9999-12-31]
Length: 3, Freq: D

In [48]: Series(span)
Out[48]: 
0      15705
1      16404
2    2932896
dtype: int64

In [49]: Series(span.asobject)
Out[49]: 
0    2012-12-31
1    2014-11-30
2    9999-12-31
dtype: object

I believe this works correctly if its a setitem in a frame, e.g.

df['span'] = span but not in the Series constructor, needs this: https://github.com/pydata/pandas/blob/master/pandas/core/series.py#L2436 called in the Series.__init__

jreback added this to the 0.15.0 milestone Aug 4, 2014

@jreback jreback added Bug Period labels Aug 4, 2014

jreback closed this in #8237 Sep 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment