Skip to content

BUG: PeriodIndex.min/max returns int #7609

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

Merged
merged 1 commit into from
Jun 29, 2014
Merged

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 29, 2014

Related to #7279. PeriodIndex.min/max should return Period ignoring NaT.

pidx = pd.PeriodIndex(['2011-01', 'NaT'], freq='M')
pidx.min()
# -9223372036854775808
pidx.max()
#492

@jreback
Copy link
Contributor

jreback commented Jun 29, 2014

is their still a need for min/max in DatetimeIndex (or were we using numpy min/max which doesn't work with NaT)?

@jreback jreback added this to the 0.14.1 milestone Jun 29, 2014
@sinhrks
Copy link
Member Author

sinhrks commented Jun 29, 2014

#7279 made DatetimeIndex.min/max to handle NaT properly. This PR moves the logic to mixin to cover PeriodIndex.

jreback added a commit that referenced this pull request Jun 29, 2014
BUG: PeriodIndex.min/max returns int
@jreback jreback merged commit 3b7916f into pandas-dev:master Jun 29, 2014
@jreback
Copy link
Contributor

jreback commented Jun 29, 2014

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants