-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enh]: implement nw.expr.interpolate_by #1739
Comments
thanks @limlam96 for the request yes, i'd say that this is in-scope does |
Nice :) I think it would yeah, the rough idea would be for a df with weight column and some numeric column, where we want to interpolate the numeric column at some given weight quantiles:
I think apart from interpolate_by, the rest should be achievable in narwhals Hope that was clear - and also open to any alternative suggestions! |
I can take this one if its free |
Will we run into issues with PySpark / DuckDB on this one? I'm wondering if |
I took a quick look and that could be the case indeed. I am not aware of a potential downside if we use dataframe.interpolate_by. |
* initial implementation in narwhals for _polars, spark_like and duckdb * simple tests added * docstrings
We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?
https://github.com/lvgig/tubular
Please describe the purpose of the new feature or describe the problem to solve.
We currently make use of np.interp in our weighted_quantile calculation (here), and are looking at how to convert this to narwhals - I think the most direct route for this would be to use a nw version of pl.Expr.interpolate_by, wondering if this fits into your roadmap at all?
Suggest a solution if possible.
a nw version of pl.Expr.interpolate_by
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
No response
The text was updated successfully, but these errors were encountered: