-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PeriodIndex with float input inconsistency #13232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ref #13079, which should fix |
@MaximilianR if you think we need to add a note (and/or include these issues) in the whatsnew, pls do a PR. I don't care about the issues per-se being referenced by GH does that. But if you are a user and want to know (and the existing notes don't cover), then pls add. |
@jreback this seems like pretty deep in the internals - shall I still add one? |
nah I looked again, its fine. thxs! Periods really coming along! |
@MaximilianR #13079 only checks on current master (d2b5819):
reopens. |
actually the original [2] should be an error as well (and |
Apologies. Will PR |
Why a |
oh these could be |
Looking through this, I think this is a pretty weird code path - only gets hit with ints that can represent Periods, which I think are just years (e.g. '2000'). Not ints representing the underlying values... https://github.com/pydata/pandas/blob/master/pandas/tseries/period.py#L229 |
hmm, yeah that does seem weird; I prob would just try to |
closes pandas-dev#13232 Material clean up of PeriodIndex constructor, which was doing a few weird things (pandas-dev#13232 (comment) nt-220788816), and generally getting messy. Author: Maximilian Roos <[email protected]> Closes pandas-dev#13277 from MaximilianR/period-float and squashes the following commits: 5cae7aa [Maximilian Roos] @jreback changes 75ff54d [Maximilian Roos] _new_PeriodIndex for unpickling 240172f [Maximilian Roos] coerce freq object earlier for perf ba5133b [Maximilian Roos] documentation b0fc0a7 [Maximilian Roos] final changes fa0fa9d [Maximilian Roos] clean up PeriodIndex constructor
Code Sample, a copy-pastable example if possible
Expected Output
Consistently raise or coerce to
Period
output of
pd.show_versions()
0.18.1
CC: @MaximilianR
The text was updated successfully, but these errors were encountered: