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

DataFrame.sort_values doesn't accept str for by param #144

Closed
tekumara opened this issue Jul 20, 2020 · 2 comments
Closed

DataFrame.sort_values doesn't accept str for by param #144

tekumara opened this issue Jul 20, 2020 · 2 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@tekumara
Copy link

Environment data

  • Language Server version: v2020.7.2
  • OS and version: macOS
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.10

Expected behaviour

No type error, see https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sort_values.html

Actual behaviour

No overloads for "df.sort_values(by='X')" match parameters
  Argument types: (Literal['X'])Pylance (reportGeneralTypeIssues)

Code Snippet / Additional information

from pandas import DataFrame

def sort(df: DataFrame) -> DataFrame:
    return df.sort_values(by='X')
@judej judej added the bug Something isn't working label Jul 20, 2020
@gramster
Copy link
Member

gramster commented Aug 6, 2020

Should be fixed in the next release.

@jakebailey jakebailey added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Aug 10, 2020
@jakebailey
Copy link
Member

This issue has been fixed in version 2020.8.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202081-13-august-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants