-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DEPR: Deprecate passing range-like arguments to DatetimeIndex, TimedeltaIndex #23919
Changes from all commits
f8bed85
5d8a107
28e2184
0f75b9d
2c40c3a
d67f87c
afdab5b
8f435ed
4d7c9e2
2e587e3
0469b74
43a52fc
f4e281e
15e6c30
5dc66f3
b931878
07bfc45
e209a81
d6df7a3
eb5d9c5
cc40717
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
import pandas as pd | ||
from pandas import (DataFrame, date_range, Index, | ||
Series, MultiIndex, Timestamp, DatetimeIndex) | ||
Series, MultiIndex, Timestamp) | ||
from pandas.core.groupby.ops import BinGrouper | ||
from pandas.compat import StringIO | ||
from pandas.util import testing as tm | ||
|
@@ -374,9 +374,9 @@ def sumfunc_value(x): | |
expected.reset_index(drop=True)) | ||
|
||
def test_groupby_groups_datetimeindex(self): | ||
# #1430 | ||
# GH#1430 | ||
periods = 1000 | ||
ind = DatetimeIndex(start='2012/1/1', freq='5min', periods=periods) | ||
ind = pd.date_range(start='2012/1/1', freq='5min', periods=periods) | ||
df = DataFrame({'high': np.arange(periods), | ||
'low': np.arange(periods)}, index=ind) | ||
grouped = df.groupby(lambda x: datetime(x.year, x.month, x.day)) | ||
|
@@ -385,7 +385,7 @@ def test_groupby_groups_datetimeindex(self): | |
groups = grouped.groups | ||
assert isinstance(list(groups.keys())[0], datetime) | ||
|
||
# GH 11442 | ||
# GH#11442 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not important, but was just wondering: why are you adding the '#' everywhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly for internal consistency (not a big deal, but for grepping purposes). A little bit because I was curious how long it would take before someone asked about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have have the gh-xxxx style as well, slight prefernce for that |
||
index = pd.date_range('2015/01/01', periods=5, name='date') | ||
df = pd.DataFrame({'A': [5, 6, 7, 8, 9], | ||
'B': [1, 2, 3, 4, 5]}, index=index) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can check
__reduce__
,d
should be_data
and the attributes dictThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, that seems to work; just pushed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this broke the legacy pickle tests; reverted.