Skip to content

Conversation

@skycaptain
Copy link
Contributor

Fixes #11611. The iterator now uses DataFrame.iteritems instead of direct indexing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the decimals lookup going to have the same problem if it's not unique here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The value of decimals is either of type dict or pandas.Series. Whereas the former can not have duplicate entries, a pandas.Series might have and direct indexing will return all values with the same index. So, this case is still not handled.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think let's raise if decimals is not unique (it should be a dict/Series).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had the same thought this morning.

@jreback
Copy link
Contributor

jreback commented Nov 16, 2015

need some tests

@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Compat pandas objects compatability with Numpy or Python functions labels Nov 18, 2015
@jreback
Copy link
Contributor

jreback commented Nov 18, 2015

pls add the test example as well (you can just smoke tests it I think; e.g. assert it runs).

add a tests for passing a non-unique decimal.

put this in the bug-fix section for a whatsnew entry.

@skycaptain
Copy link
Contributor Author

Agreed.

@jreback jreback added this to the 0.17.1 milestone Nov 20, 2015
jreback pushed a commit that referenced this pull request Nov 20, 2015
BUG: decimals must be unique indexed, #11618

BUG: Added test, added whatsnew entry, #11618

TST: move round testing to test_format.py
@jreback
Copy link
Contributor

jreback commented Nov 20, 2015

merged via 80a2d53

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Compat pandas objects compatability with Numpy or Python functions Reshaping Concat, Merge/Join, Stack/Unstack, Explode

3 participants