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

pd.DataFrame not in completion results #13

Closed
qubitron opened this issue Jul 1, 2020 · 8 comments
Closed

pd.DataFrame not in completion results #13

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

Comments

@qubitron
Copy link

qubitron commented Jul 1, 2020

Environment data

  • Language Server version: 2020.6.1
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.0 32-bit virtualenv

Expected behaviour

pd.DataFrame is in completion results

Actual behaviour

image

@gokturksm
Copy link

Same behavior with pd.Series, pd.Timestamp etc. They are not exactly functions I guess, maybe that's the cause of the problem?

@gramster
Copy link
Member

gramster commented Jul 1, 2020

I think the stubs are alright here, but the only class that's showing as a completion off pd. is the public one defined in __init__.py itself, not the ones that are imported from other modules by __init__.py. Those classes work fine once you have them; i.e. you get completions for pd.DataFrame(). etc. So there's something odd going on.

@erictraut
Copy link
Contributor

Is this perhaps related to this bug? microsoft/pyright#782

@gramster
Copy link
Member

gramster commented Jul 6, 2020

Looks like it but I will wait to confirm before marking this as fixed.

@Minituff
Copy link

Minituff commented Jul 9, 2020

I am getting this error as well. For example, Pylance thinks this is invalid because it cannot see the types of DataFrame:
df = pd.DataFrame.from_dict(my_dict)
I get IntelliSense when I use Jedi alone without Pylance.

Pylance Version: 2020.6.1
Python Language Server Version: 2020.6.91350
Python: 3.7.6
OS: Windows 10

@judej judej added bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version labels Jul 9, 2020
@jakebailey
Copy link
Member

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

@Minituff
Copy link

Minituff commented Jul 9, 2020

That was a fast update!
I just tried out the new 2020.7.0 release. It looks like the errors have stopped, but I am still not getting IntelliSense like I get with Pyright for pandas dataframes. Should I open a new issue for this?

@jakebailey
Copy link
Member

Yes, please do. Pyright doesn't ship any pandas stubs, but we do, so there may be a difference there where it's reading the "real" code.

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

7 participants