Comments (4)
Hi Karl,
Thank you! Sorry, I totally missed that parameter to register plugin function. It seems it defaults to False for performance reasons (I guess implicitly assuming that most won't use pl.struct in their rust implementations).
In any case, I set it to "True" and my issue seems to have been resolved.
pass_name_to_apply
If set to `True`, the `Series` passed to the function in a group-by operation
will ensure the name is set. This is an extra heap allocation per group.
I will close this issue as setting to True works for my usecase
from pyo3-polars.
Hello! would it be possible to ask for a rough ETA for something like this to be fixed? Unfortunately I'm not familiar enough with the codebase to know where to look - but happy to try a PR if someone can provide guidance
Unf this is causing inconsistent behaviour in my pl.Struct outputs in the meantime
from pyo3-polars.
There was a recent issue where this was fixed in Polars for qcut
: pola-rs/polars#15715 (input name "empty" in a groupby context)
It seems this is controlled via the FunctionOptions pass_name_to_apply
if self.pass_name_to_apply {
s.rename(&name);
}
It seems that register_plugin_function also has this option which should fix this.
register_plugin_function(
...,
pass_name_to_apply=True
)
(I'm not sure why it defaults to False - perhaps someone with more knowledge can answer that.)
from pyo3-polars.
for performance reasons
Ah! I didn't realize the function had its own docs page.
It seems like something that could be added to the User Guide or to @MarcoGorelli's Plugin Tutorial - as it could be considered a bit of a "gotcha".
from pyo3-polars.
Related Issues (20)
- Minimal plugin may segfault HOT 2
- Sorted flag not preserved when returning the PyDataFrame to Rust
- Allow to set expression output type based on kwargs HOT 2
- cannot find -lpython3.10: No such file or directory HOT 1
- Kernel panics when passing list(categorical) as input
- Support for Using Polars Extension with `over` Syntax HOT 1
- How to pass kwarg to func output type HOT 4
- plugins' names not respected? HOT 3
- Namespace API for DataFrame/LazyFrame
- Polars 0.26 rc1: plugins panic when passing String input HOT 2
- `ArrowInvalid` when return a `PyDataFrame` to python HOT 2
- LazyFrame::anonymous_scan can't be send to python HOT 1
- Pluggin list
- The first call to pyfunction returning PyDataFrame is slow HOT 3
- Please add examples of passing dataframes between python and rust HOT 1
- Allow for custom datasources as plugins HOT 10
- Template repository for pyo3-polars
- Upgrade to PyO3 0.21.1 HOT 2
- Upgrade pyo3-polars and friends to PyO3 0.21 and its new Bound<> APIs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyo3-polars.