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

Added log10 to the list of unary functions df.eval can handle #24140

Merged
merged 5 commits into from Dec 9, 2018

Conversation

euri10
Copy link
Contributor

@euri10 euri10 commented Dec 7, 2018

(pandas) ➜ pandas git:(binary_math_log) git diff upstream/master -u -- "*.py" | flake8 --diff

  • whatsnew entry

@pep8speaks
Copy link

Hello @euri10! Thanks for submitting the PR.

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24140   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         162      162           
  Lines       51701    51701           
=======================================
  Hits        47671    47671           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 43.02% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...8ecf4ce. Read the comment docs.

4 similar comments
@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24140   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         162      162           
  Lines       51701    51701           
=======================================
  Hits        47671    47671           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 43.02% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...8ecf4ce. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24140   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         162      162           
  Lines       51701    51701           
=======================================
  Hits        47671    47671           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 43.02% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...8ecf4ce. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24140   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         162      162           
  Lines       51701    51701           
=======================================
  Hits        47671    47671           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 43.02% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...8ecf4ce. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24140   +/-   ##
=======================================
  Coverage    92.2%    92.2%           
=======================================
  Files         162      162           
  Lines       51701    51701           
=======================================
  Hits        47671    47671           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.6% <ø> (ø) ⬆️
#single 43.02% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...8ecf4ce. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #24140 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24140      +/-   ##
==========================================
+ Coverage    92.2%   92.21%   +<.01%     
==========================================
  Files         162      162              
  Lines       51701    51723      +22     
==========================================
+ Hits        47671    47695      +24     
+ Misses       4030     4028       -2
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 43.03% <ø> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/core/computation/ops.py 95.6% <ø> (ø) ⬆️
pandas/util/testing.py 87.41% <0%> (-0.1%) ⬇️
pandas/core/internals/blocks.py 93.67% <0%> (-0.05%) ⬇️
pandas/core/indexes/base.py 96.27% <0%> (-0.01%) ⬇️
pandas/core/frame.py 96.91% <0%> (ø) ⬆️
pandas/core/generic.py 96.65% <0%> (ø) ⬆️
pandas/core/arrays/interval.py 92.98% <0%> (ø) ⬆️
pandas/core/groupby/groupby.py 96.5% <0%> (ø) ⬆️
pandas/io/pytables.py 92.31% <0%> (ø) ⬆️
pandas/core/internals/managers.py 95.93% <0%> (+0.01%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03134cb...068b474. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Dec 7, 2018

can you add a test for this, in pandas/tests/computation/test_eval.py & a whatsnew note (bug fixes for numeric is ok)

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.

comments

@jreback jreback added the Numeric Operations Arithmetic, Comparison, and Logical operations label Dec 7, 2018
@euri10
Copy link
Contributor Author

euri10 commented Dec 7, 2018

Added the whatsnew part as requested @jreback
For the tests, it seems unecessary to me to add something new, the existing one are already handled in here by looping through unary_fns which get its value from _unary_math_ops I just extended.

@@ -52,3 +52,7 @@ Bug Fixes
**I/O**

- Bug in :func:`read_csv` that caused it to raise ``OverflowError`` when trying to use 'inf' as ``na_value`` with integer index column (:issue:`17128`)

Copy link
Contributor

Choose a reason for hiding this comment

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

can you move this to 0.24.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oups, done, sorry for that

@@ -51,4 +51,4 @@ Bug Fixes

**I/O**

- Bug in :func:`read_csv` that caused it to raise ``OverflowError`` when trying to use 'inf' as ``na_value`` with integer index column (:issue:`17128`)
- Bug in :func:`read_csv` that caused it to raise ``OverflowError`` when trying to use 'inf' as ``na_value`` with integer index column (:issue:`17128`)
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to checkout this file from master as it should be unchanged.

@@ -1375,6 +1375,7 @@ Numeric
- :meth:`Series.agg` can now handle numpy NaN-aware methods like :func:`numpy.nansum` (:issue:`19629`)
- Bug in :meth:`Series.rank` and :meth:`DataFrame.rank` when ``pct=True`` and more than 2:sup:`24` rows are present resulted in percentages greater than 1.0 (:issue:`18271`)
- Calls such as :meth:`DataFrame.round` with a non-unique :meth:`CategoricalIndex` now return expected data. Previously, data would be improperly duplicated (:issue:`21809`).
- Added log10 to the list of supported functions in ``df.eval`` (:issue:`24139`)
Copy link
Contributor

Choose a reason for hiding this comment

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

use double back-ticks on log10, use a :meth: reference for eval

Used correct syntax for whatsnew, hopefully
@jreback jreback added this to the 0.24.0 milestone Dec 9, 2018
@jreback
Copy link
Contributor

jreback commented Dec 9, 2018

lgtm ping on green.

@jreback jreback merged commit 3dbb137 into pandas-dev:master Dec 9, 2018
@euri10 euri10 deleted the binary_math_log branch December 10, 2018 08:59
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants