Skip to content

BUG: fixed value_counts with datetime64[ns], GH 3002 #3003

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
Mar 10, 2013

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Mar 10, 2013

Fixes issue #3002

  • Fixed for datetime64[ns]
  • Fixed for timedelta64[ns](though the returned index
    is actually int64, which is wrong, should make a TimeDeltaIndex class....someday)
  • Fixed NaT display in a DateTimeIndex (was displaying funny)
0   2010-01-01 00:00:00
1   2010-01-01 00:00:00
2   2009-01-01 00:00:00
3   2008-09-09 00:00:00
Name: dt, dtype: datetime64[ns]

2010-01-01    2
2008-09-09    1
2009-01-01    1
dtype: int64

<class 'pandas.tseries.index.DatetimeIndex'>
[2010-01-01 00:00:00, ..., 2009-01-01 00:00:00]
Length: 3, Freq: None, Timezone: None

WIth NaTs

0   2010-01-01 00:00:00
1   2010-01-01 00:00:00
2   2009-01-01 00:00:00
3   2008-09-09 00:00:00
4                   NaT
dtype: datetime64[ns]

2010-01-01    2
2009-01-01    1
NaT           1
2008-09-09    1
dtype: int64

<class 'pandas.tseries.index.DatetimeIndex'>
[2010-01-01 00:00:00, ..., 2008-09-09 00:00:00]
Length: 4, Freq: None, Timezone: None

TST: added test_datetimeindex formats with NaT
jreback added a commit that referenced this pull request Mar 10, 2013
BUG: fixed value_counts with datetime64[ns], GH 3002
@jreback jreback merged commit c9a7245 into pandas-dev:master Mar 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant