Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
API: New callable indexing makes storing functions in a Series difficult #13299
Comments
|
this is quite odd to store callables in a Series what is the purpose of doing that? |
|
hmm, this is simple to fix (we just don't evaluate a callable for @sinhrks do we have a valid use of |
jreback
added Indexing API Design
labels
May 27, 2016
jreback
added this to the
0.18.2
milestone
May 27, 2016
|
We're choosing a function based on some columns in a DataFrame, and then applying them on other column values / external data. Since there might be a different function for each row, it's convenient to store them in the same place. |
|
@evanpw I think you might be able to just remove the If you want to give this a shot and see what it looks like would be great. |
|
Yes, deleting this line from
|
|
The usage in my mind was chaining like:
I think it is more likely rather than storing callable. CC: @TomAugspurger |
|
I think that makes sense when calling |
|
yes that is a bug I think. |
evanpw commentedMay 26, 2016
•
edited
Example of something that previously worked (before 7bbd031):
But now the second line tries to apply the function in the rhs to the elements of the Series, rather than assigning them (and throws an exception). This is very counter-intuitive when using
__setitem__rather than callingSeries.wheredirectly.