Skip to content

Conversation

@rhshadrach
Copy link
Member

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

key_index = None

# make Nones an empty object
v = first_not_none(values)
Copy link
Member

Choose a reason for hiding this comment

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

it looks like there are two places where first_not_none is called, and values can change in between them

Copy link
Member Author

@rhshadrach rhshadrach Apr 6, 2020

Choose a reason for hiding this comment

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

Ah, thanks. I was thinking that it's only the kind of object being used and so the second call was not needed, but it really should be updated. I moved the update into the if block so that it is only done when needed. For what it's worth, I added an assert to see if the value order ever did change and it never got triggered by the tests.

@jreback jreback added the Clean label Apr 10, 2020
@jreback jreback added this to the 1.1 milestone Apr 10, 2020
@jreback jreback merged commit b9cf9be into pandas-dev:master Apr 10, 2020
@jreback
Copy link
Contributor

jreback commented Apr 10, 2020

thanks @rhshadrach

@rhshadrach rhshadrach deleted the first_not_none branch July 11, 2020 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants