-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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 Series.valid #18800
DEPR: Deprecate Series.valid #18800
Conversation
b3eabd1
to
537550e
Compare
doc/source/whatsnew/v0.22.0.txt
Outdated
@@ -203,6 +203,7 @@ Deprecations | |||
- ``Series.from_array`` and ``SparseSeries.from_array`` are deprecated. Use the normal constructor ``Series(..)`` and ``SparseSeries(..)`` instead (:issue:`18213`). | |||
- ``DataFrame.as_matrix`` is deprecated. Use ``DataFrame.values`` instead (:issue:`18458`). | |||
- ``Series.asobject``, ``DatetimeIndex.asobject``, ``PeriodIndex.asobject`` and ``TimeDeltaIndex.asobject`` have been deprecated. Use ``.astype(object)`` instead (:issue:`18572`) | |||
- ``Series.valid`` is deprecated. Use ``Series.dropna`` instead (:issue:`18800`). |
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.
can you do :func:`Series.dropna`
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.
changed to :meth:`Series.dropna
.
pandas/tests/generic/test_generic.py
Outdated
@@ -581,6 +581,10 @@ def test_validate_bool_args(self): | |||
with pytest.raises(ValueError): | |||
super(DataFrame, df).mask(cond=df.a > 2, inplace=value) | |||
|
|||
def test_valid_deprecated(self): | |||
with tm.assert_produces_warning(FutureWarning): |
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.
add the issue number here
not sure this is actually in the right place. these are fairly generic routines
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.
Ok, I've moved the test to tests/generic/test_series.py
.
Codecov Report
@@ Coverage Diff @@
## master #18800 +/- ##
==========================================
- Coverage 91.63% 91.62% -0.02%
==========================================
Files 154 154
Lines 51422 51430 +8
==========================================
- Hits 47123 47122 -1
- Misses 4299 4308 +9
Continue to review full report at Codecov.
|
537550e
to
4ee1baa
Compare
Hello @topper-123! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on December 15, 2017 at 23:40 Hours UTC |
4ee1baa
to
8c534ca
Compare
lgtm. ping on green. |
I'm using |
no we always use FutureWarning |
All green |
git diff upstream/master -u -- "*.py" | flake8 --diff
This PR deprecates the
valid
method onpd.Series
. This method duplicatesdropna
and should be deprecated according to #18262.