Skip to content
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 pandas.np module #30386

Merged
merged 14 commits into from
Dec 27, 2019
Merged

DEPR: Deprecate pandas.np module #30386

merged 14 commits into from
Dec 27, 2019

Conversation

lithomas1
Copy link
Member

@lithomas1 lithomas1 commented Dec 20, 2019

  • closes DEPR: Remove pandas.np #30296
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@pep8speaks
Copy link

pep8speaks commented Dec 20, 2019

Hello @lithomas1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-12-26 02:00:49 UTC

@lithomas1 lithomas1 marked this pull request as ready for review December 20, 2019 23:31
@lithomas1 lithomas1 changed the title DEPR:Remove pandas.np module DEPR: Deprecate pandas.np module Dec 20, 2019
@jorisvandenbossche
Copy link
Member

py36 needs to be handled separately

You can still do the import numpy as np in the else clause.

Can you also add tests for this? (that it still works but generates a warning for py37)

@lithomas1
Copy link
Member Author

@jbrockmendel and @jorisvandenbossche
Can you take another look at the code? I added tests and made the deprecation warnings also show on Python 3.6

@gfyoung gfyoung added the Deprecate Functionality to remove in pandas label Dec 22, 2019
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates!

pandas/tests/api/test_api.py Outdated Show resolved Hide resolved
@alimcmaster1 alimcmaster1 added this to the 1.0 milestone Dec 24, 2019
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Cools stuff @lithomas1, thanks for working on this.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lithomas1 lgtm. very minor comment. pls rebase on master and ping on green.

doc/source/whatsnew/v1.0.0.rst Outdated Show resolved Hide resolved
@lithomas1
Copy link
Member Author

lithomas1 commented Dec 26, 2019

ping @jreback
CI has passed.

@jreback jreback merged commit fb20b26 into pandas-dev:master Dec 27, 2019
@jreback
Copy link
Contributor

jreback commented Dec 27, 2019

thanks @lithomas1 very nice!

@lithomas1 lithomas1 deleted the remove-pandas-np branch December 28, 2019 02:30
AlexKirko pushed a commit to AlexKirko/pandas that referenced this pull request Dec 29, 2019
keechongtan added a commit to keechongtan/pandas that referenced this pull request Dec 29, 2019
…ndexing-1row-df

* upstream/master: (333 commits)
  CI: troubleshoot Web_and_Docs failing (pandas-dev#30534)
  WARN: Ignore NumbaPerformanceWarning in test suite (pandas-dev#30525)
  DEPR: camelCase in offsets, get_offset (pandas-dev#30340)
  PERF: implement scalar ops blockwise (pandas-dev#29853)
  DEPR: Remove Series.compress (pandas-dev#30514)
  ENH: Add numba engine for rolling apply (pandas-dev#30151)
  [ENH] Add to_markdown method (pandas-dev#30350)
  DEPR: Deprecate pandas.np module (pandas-dev#30386)
  ENH: Add ignore_index for df.drop_duplicates (pandas-dev#30405)
  BUG: The setting xrot=0 in DataFrame.hist() doesn't work with by and subplots pandas-dev#30288 (pandas-dev#30491)
  CI: Fix GBQ Tests (pandas-dev#30478)
  Bug groupby quantile listlike q and int columns (pandas-dev#30485)
  ENH: Add ignore_index for df.sort_values and series.sort_values (pandas-dev#30402)
  TYP: Typing hints in pandas/io/formats/{css,csvs}.py (pandas-dev#30398)
  BUG: raise on non-hashable Index name, closes pandas-dev#29069 (pandas-dev#30335)
  Replace "foo!r" to "repr(foo)" syntax pandas-dev#29886 (pandas-dev#30502)
  BUG: preserve EA dtype in transpose (pandas-dev#30091)
  BLD: add check to prevent tempita name error, clsoes pandas-dev#28836 (pandas-dev#30498)
  REF/TST: method-specific files for test_append (pandas-dev#30503)
  marked unused parameters (pandas-dev#30504)
  ...
self.warnings = warnings

def __getattr__(self, item):
self.warnings.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im getting a mypy complaint about this. why use self.warnings rather than just warnings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: Remove pandas.np
8 participants