You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just found this package through pandas-dev/pandas#10030, really great stuff. I've put functions for working with weighted data in my microdf package, but looking to remove them in lieu of this and hopefully at some point native pandas support (MaxGhenis/microdf#55).
One feature I've found useful is the ability to pass a list of quantiles to quantile. Currently:
calc.quantile(adults, "income", [0.25, 0.75])
produces:
TypeError: '<' not supported between instances of 'list' and 'int'
This isn't that hard to do outside e.g. with list comprehension so might not be a high priority, but could save some code if it's common:
[calc.quantile(adults, "income", x) for x in [0.25, 0.75]]
The text was updated successfully, but these errors were encountered:
Really glad to hear that you’re finding the library useful, @MaxGhenis. And thanks for noting your use-case here.
For now, I’m going to refrain from adding this feature, because (a) as you note, it’s not terribly difficult to produce the same effect with a list comprehension, and (b) I’m somewhat wary of allowing the library’s parameters to take more than one type. (Maybe one way would be to create a new method, calc.quantiles, plural, that could accept a list?)
But I can totally see the argument for adding it, and I’m open to being persuaded to do so in the future.
Just found this package through pandas-dev/pandas#10030, really great stuff. I've put functions for working with weighted data in my
microdf
package, but looking to remove them in lieu of this and hopefully at some point native pandas support (MaxGhenis/microdf#55).One feature I've found useful is the ability to pass a list of quantiles to
quantile
. Currently:produces:
This isn't that hard to do outside e.g. with list comprehension so might not be a high priority, but could save some code if it's common:
The text was updated successfully, but these errors were encountered: