Closed MarcoGorelli closed 1 month ago
I have implementation for most methods in the name
namespace, however there might be an issue: PandasSeries
already defines a name
property which makes impossible to register the namespace 😕
wow, I'm impressed!
🤔 doesn't polars.Series also have that? https://github.com/pola-rs/polars/blob/11fe9d8f223d50b5e3284b924bb969049b0be6c6/py-polars/polars/series/series.py#L589-L590
I think .name.suffix
should only go on expressions, not series, right?
perhaps take a look at .alias
, that's fairly similar
Oh I see, instead of defining the methods on series and then register them, it is enough to define them in the PandasExpr
yeah, exactly! the register function is just a trick which allows you to reuse the Series implementation. register_expression_call
isn't a good function name to be fair...reuse_series_implementation
might be better?
I am a bit uncertain of a detail, I will open a PR so that we can discuss with code on hand :)
From a request here