Skip to content
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

Error when using .arrange() #233

Open
GarronG opened this issue Jan 10, 2024 · 1 comment
Open

Error when using .arrange() #233

GarronG opened this issue Jan 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@GarronG
Copy link

GarronG commented Jan 10, 2024

As an avid user of tidyverse, and a newcomer to Python I'm so excited to have discovered tidypolars! I just tried out a simple example below, but I am getting the error message. I am using python 3.9.17 on Windows 10 X64 PC.

import tidypolars as tp
from tidypolars import col, desc
df = tp.Tibble(x = range(3), y = range(3, 6), z = ['a', 'a', 'b'])
df.arrange('x')

Error message:

TypeError Traceback (most recent call last)
Cell In[9], line 5
3 from tidypolars import col, desc
4 df = tp.Tibble(x = range(3), y = range(3, 6), z = ['a', 'a', 'b'])
----> 5 df.arrange('x')

File H:\share\Texas\Garron\py3917\lib\site-packages\tidypolars\tibble.py:102, in Tibble.arrange(self, *args)
100 exprs = _as_list(args)
101 desc = [True if isinstance(expr, DescCol) else False for expr in exprs]
--> 102 return super().sort(exprs, reverse = desc).pipe(from_polars)

TypeError: sort() got an unexpected keyword argument 'reverse'

@markfairbanks
Copy link
Owner

polars has been implementing changes (and breaking changes) faster than I can keep up with. Changing reverse to descending in .sort() was one of them. It's good that polars is constantly improving, but the API instability makes it a bit hard to build a package that depends on it.

There are probably a lot more fixes necessary to get tidypolars back to a good state. I'll try to get to them at some point, but between a newborn and a new job I'm bit behind on keeping this package up to date. I've only had enough time lately to keep updates to R's tidytable and dtplyr.

Unfortunately that means for for the foreseeable future tidypolars is a "broken" package. I am waiting for a polars v1.0.0 release so I can be sure it is more stable before reviving tidypolars.

@markfairbanks markfairbanks added the bug Something isn't working label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants