Closed mikel-brostrom closed 1 year ago
Hello,
Thanks for this. But could you clarify the purpose and context of this piece of code? I don't see exactly which problem it addresses.
It is just an example on how to apply an interval dict on a pandas dataframe column. Nothing more
Ok, so a kind of value-based map function that, depending on the value, apply a different function on a column. Right? To some extent, the goal of this example is to show how to apply different functions without having to rely on combinations of "where"?
Ok, so a kind of value-based map function that, depending on the value, apply a different function on a column.
Exactly
Ok, thanks ! Let's keep the "information" label for this issue, and I'll refer to it in a (not yet created) "recipe" section of the documentation.
I just used your library with pandas, but I could not find a single example on how to do this, so I though it would be nice to leave one here. I applied an
IntervalDict
on a column: