feat: add native property and deprecate .to_native() method#1301
feat: add native property and deprecate .to_native() method#1301
native property and deprecate .to_native() method#1301Conversation
|
nice!
|
|
I updated accordingly, let me leave a couple of comments:
I replaced only the cases for
I added this, and tested as well. Yet, since it is a free operation, I don't think it is a big drawback keeping it. I personally like the
👍🏼 |
|
My understanding is that CI is failing because all the imports in stable v1 docstrings changed + import narwhals as nw
- import narwhals.stable.v1 as nwhow's that the case? |
|
thanks!
🤔 maybe we can bikeshed on this longer then 😄 longterm I think it'd be better to stabilise on a single api...on the one hand, I like the symmetry of to/from, but on the other hand, I do like that |
sorry yeah this was in #1278 |
Just to be sure, was this intended? |
|
CI looks like it's green now, I think the only failure is because of deprecation warnings having changed in py13, looking into it |
Found the doctest that was raising, I changed it to call |
native propertynative property and depredate .to_native() method
native property and depredate .to_native() methodnative property and deprecate .to_native() method
|
thanks!
shall we sleep on this one a bit longer then? i don't feel super-strongly about this one tbh, happy to keep |
Would it be bad to introduce |
|
I also don't have a strong preference. We could keep it as alias for now, and move the discussion to an issue. In the meantime, we can suggest |
|
maybe this can be a good topic for discussion for tomorrow's community call? |
|
I think adding Shortens paths like this, where lots of places use inconsistent aliasing: narwhals/narwhals/_arrow/series.py Line 319 in b03f716 narwhals/narwhals/_arrow/series.py Line 771 in b03f716 narwhals/narwhals/_arrow/series.py Line 741 in b03f716 narwhals/narwhals/_arrow/series.py Line 896 in b03f716 narwhals/narwhals/_arrow/series.py Line 832 in b03f716 Being a Also for things like #2044 (comment), there's an obvious place to hint the |
|
Thanks for reviewing @dangotbanned! The original PR was not for introducing I think having |
That class was the motivating case in #1301 (comment)
|
@FBruzzesi I've tested this out for some parts of Really think it's a nice improvement to readabilty and DRYs things up well 🙂 With a lot of the repetition out of the way, I was able to spot a few more things that could be written more concisely. Not sure if this is worth opening an issue for - but if we went ahead with it - then it'd probably make sense to try and do it in one or more big chunks to avoid conflicts |
Hey @dangotbanned sorry I had the chance to look at the code only now. It definitly looks a bit different from what this PR was trying to do. Regarding |
|
Yeah I agree @FBruzzesi wrt the public Apologies for hijacking the PR w/ (#1301 (comment)) - I'll continue that as it's own thing 👍 |
|
Closing this for now |
What type of PR is this? (check all applicable)
Related issues
DataFrame.native/LazyFrame.native/Series.nativeproperties #1295Checklist
If you have comments or can explain your changes, please do so below.