Skip to content

COMPAT: followup to #17491 #17503

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

Merged
merged 2 commits into from
Sep 13, 2017
Merged

COMPAT: followup to #17491 #17503

merged 2 commits into from
Sep 13, 2017

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Sep 12, 2017

No description provided.

@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Sep 12, 2017
@jreback jreback added this to the 0.21.0 milestone Sep 12, 2017
@codecov
Copy link

codecov bot commented Sep 13, 2017

Codecov Report

Merging #17503 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17503      +/-   ##
==========================================
- Coverage   91.18%   91.16%   -0.02%     
==========================================
  Files         163      163              
  Lines       49543    49545       +2     
==========================================
- Hits        45177    45170       -7     
- Misses       4366     4375       +9
Flag Coverage Δ
#multiple 88.95% <100%> (ø) ⬆️
#single 40.21% <88.88%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/base.py 96.01% <100%> (ø) ⬆️
pandas/core/categorical.py 95.52% <100%> (+0.01%) ⬆️
pandas/core/indexes/category.py 98.54% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.77% <0%> (-0.1%) ⬇️

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 83436af...03af10c. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 13, 2017

Codecov Report

Merging #17503 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17503      +/-   ##
==========================================
- Coverage   91.18%   91.16%   -0.02%     
==========================================
  Files         163      163              
  Lines       49543    49545       +2     
==========================================
- Hits        45177    45169       -8     
- Misses       4366     4376      +10
Flag Coverage Δ
#multiple 88.95% <100%> (-0.01%) ⬇️
#single 40.21% <87.5%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/base.py 96.01% <100%> (ø) ⬆️
pandas/core/indexes/category.py 98.54% <100%> (ø) ⬆️
pandas/core/categorical.py 95.52% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.77% <0%> (-0.1%) ⬇️
pandas/core/indexes/datetimes.py 95.43% <0%> (-0.1%) ⬇️
pandas/core/reshape/reshape.py 99.29% <0%> (ø) ⬆️
pandas/core/strings.py 98.46% <0%> (ø) ⬆️
pandas/core/generic.py 91.98% <0%> (ø) ⬆️
... and 1 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 83436af...c4cf873. Read the comment docs.

@@ -193,16 +193,16 @@ the target. Now, a ``ValueError`` will be raised when such an input is passed in
Iteration of Series/Index will now return python scalars
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Previously, when using certain iteration methods for a ``Series`` with dtype ``int`` or ``float``, you would receive a ``numpy`` scalar, e.g. a ``np.int64``, rather than a python ``int``. Issue (:issue:`10904`) corrected this for ``Series.tolist()`` and ``list(Series)``. This change makes all iteration methods consistent, in particular, for ``__iter__()`` and ``.map()``; note that this only affect int/float dtypes. (:issue:`13236`, :issue:`13258`, :issue:`14216`).
Previously, when using certain iteration methods for a ``Series`` with dtype ``int`` or ``float``, you would receive a ``numpy`` scalar, e.g. a ``np.int64``, rather than a python ``int``. Issue (:issue:`10904`) corrected this for ``Series.tolist()`` and ``list(Series)``. This change makes all iteration methods consistent, in particular, for ``__iter__()`` and ``.map()``; note that this only affects int/float dtypes. (:issue:`13236`, :issue:`13258`, :issue:`14216`).
Copy link
Member

@gfyoung gfyoung Sep 13, 2017

Choose a reason for hiding this comment

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

python --> Python (same thing in the doc-strings that you changed)

@@ -892,18 +892,27 @@ def argmin(self, axis=None):

def tolist(self):
"""
return a list of the values; box to scalars
return a list of the values. These are each a scalar type, which is
Copy link
Member

@gfyoung gfyoung Sep 13, 2017

Choose a reason for hiding this comment

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

Capitalize that first sentence (same with __iter__ doc-string)

@@ -1102,3 +1136,40 @@ def test_categorial_datetimelike(self, method):

result = method(i)[0]
assert isinstance(result, Timestamp)

def test_iter_box(self):
Copy link
Member

Choose a reason for hiding this comment

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

Is this just a new test for coverage purposes or related to any of the issues you addressed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a moved test

@jreback jreback merged commit eef810e into pandas-dev:master Sep 13, 2017
""" iterate like Categorical """
return self._data.__iter__()
def tolist(self):
return self._data.tolist()
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is needed? Base Index already defines this as self._values.tolist(), and _values and _data is both a Categorical ?

jreback pushed a commit that referenced this pull request Sep 17, 2017
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants