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

pandas sort_values ascending argument should allow a list #38

Closed
Dr-Irv opened this issue Jan 7, 2021 · 1 comment
Closed

pandas sort_values ascending argument should allow a list #38

Dr-Irv opened this issue Jan 7, 2021 · 1 comment

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented Jan 7, 2021

Following code fails (pylance 2021.1.0)

import pandas as pd

df: pd.DataFrame = pd.DataFrame({"x": [12, 34], "y": [78, 9]})

ds: pd.DataFrame = df.sort_values(["x", "y"], ascending=[True, False])

Possible fix:

diff core/frame.pyi.ORIG core/frame.pyi
1676c1676
<         ascending: _bool = ...,
---
>         ascending: Union[_bool, Sequence[_bool]] = ...,
1688c1688
<         ascending: _bool = ...,
---
>         ascending: Union[_bool, Sequence[_bool]] = ...,
1699c1699
<         ascending: _bool = ...,
---
>         ascending: Union[_bool, Sequence[_bool]] = ...,
@domandinho
Copy link
Contributor

PR #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants