-
-
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 cdate_range and merge into bdate_range #17691
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ class TestPDApi(Base): | |
# top-level functions | ||
funcs = ['bdate_range', 'concat', 'crosstab', 'cut', | ||
'date_range', 'interval_range', 'eval', | ||
'factorize', 'get_dummies', 'cdate_range', | ||
'factorize', 'get_dummies', | ||
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. move to the deprecated functions section, and add a test (in same module), model after the top-level deprecations. |
||
'infer_freq', 'isna', 'isnull', 'lreshape', | ||
'melt', 'notna', 'notnull', 'offsets', | ||
'merge', 'merge_ordered', 'merge_asof', | ||
|
@@ -240,3 +240,13 @@ def test_deprecation_access_func(self): | |
[c1, c2], | ||
sort_categories=True, | ||
ignore_order=True) | ||
|
||
|
||
class TestCDateRange(object): | ||
|
||
def test_deprecation_cdaterange(self): | ||
# GH17596 | ||
from pandas.core.indexes.datetimes import cdate_range | ||
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. import from pandas here (we are actually testing the pd. deprecation); in this case they are the same, but its our practice to use the one we are deprecating. 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. no, we are testing this one (the move to top-level pd namespace was only very recently in master, so we don't have to deprecate that. That one we just removed, and we are deprecating the actual nested one) 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. oh, ok then; guess we moved this in 0.21.0, so this is fine then. |
||
with tm.assert_produces_warning(FutureWarning, | ||
check_stacklevel=False): | ||
cdate_range('2017-01-01', '2017-12-31') |
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.
thanks for fixing this!