-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Code completion for Pandas is not working #21660
Comments
Hey @PhilipYip1988, thanks for reporting. I can't reproduce this on Linux. @dalthviz, can you try it on Windows? Thanks! |
Although I'm not sure if I'm testing this correctly (when you say docstrings and identifiers @PhilipYip1988 you mean like the completion options that are retrieved and also that for the highlighted completion option its documentation is shown, right?). Checking locally I got the same behavior regardless of testing with Spyder 6 from conda and Spyder 5.5.0 for all the cases. However, indeed there are cases when Spyder does not provide any docstring/completion from the Editor like the ones mentioned over the OP, maybe some regression regarding completion happened between Spyder 5.4.3 and 5.5.0? |
I would like to sincerely ask whether there is a solution for this. |
We don't know why this is happening, sorry. |
Retested with Spyder 6.0.0a5. datetime
![1](https://github.com/spyder-ide/spyder/assets/56493395/f9fcee1c-9420-4e46-9cd4-46f6d365b924)
![2](https://github.com/spyder-ide/spyder/assets/56493395/34396e9f-d6b0-4974-85d8-a49b4c7f5dc5)
![3](https://github.com/spyder-ide/spyder/assets/56493395/3f083982-8ff0-4d07-b804-7327e1e573d4)
![4](https://github.com/spyder-ide/spyder/assets/56493395/c368412a-71cf-4f7e-9d15-c631ab86eb06)
time
![6](https://github.com/spyder-ide/spyder/assets/56493395/9f31feb2-b2c2-4b1d-8cda-ab45970eeefe)
![7](https://github.com/spyder-ide/spyder/assets/56493395/aeb3bf8a-69af-49ad-b789-374b2667824c)
![8](https://github.com/spyder-ide/spyder/assets/56493395/df0f7a6e-1b05-4c4d-9c2b-b66915ad5f4e)
![9](https://github.com/spyder-ide/spyder/assets/56493395/a0527a62-e328-4f18-a547-2a5b52c82266)
![10](https://github.com/spyder-ide/spyder/assets/56493395/782789fb-47ef-4d10-a0d4-1de68956dc0c)
![11](https://github.com/spyder-ide/spyder/assets/56493395/a7b18762-c25d-4325-b4d5-e35d098e9060)
numpy
![13](https://github.com/spyder-ide/spyder/assets/56493395/8c3e84e4-9aa5-4c44-8244-581dde5d1d2e)
![14](https://github.com/spyder-ide/spyder/assets/56493395/77350b02-6ea2-4cac-b041-82906d54d084)
![15](https://github.com/spyder-ide/spyder/assets/56493395/5cdc0679-4239-4edc-bc83-a46ed551da69)
![16](https://github.com/spyder-ide/spyder/assets/56493395/c2eb2adf-1308-4180-b551-9edbe20d548c)
![17](https://github.com/spyder-ide/spyder/assets/56493395/2f85f2fb-7191-4cb8-b1d5-2a52e1e3ea64)
![18](https://github.com/spyder-ide/spyder/assets/56493395/bc5599f6-1a25-43f5-916a-8beb9bef592a)
pandas
![19](https://github.com/spyder-ide/spyder/assets/56493395/be34e028-81ff-4fd2-9e21-51f88367ed86)
![20](https://github.com/spyder-ide/spyder/assets/56493395/0c4b6049-47bf-4915-a153-74267dcd5c1e)
![21](https://github.com/spyder-ide/spyder/assets/56493395/c8cff894-88bc-4a7f-b877-151b0bdb39e4)
![23](https://github.com/spyder-ide/spyder/assets/56493395/6fe5e4d7-63df-4683-a354-de450610a0ce)
![24](https://github.com/spyder-ide/spyder/assets/56493395/9765fdcf-ac2a-4422-bfca-6479bb1d8190)
|
@PhilipYip1988, thanks for the very detailed update! I collapsed the screenshots of those things that are working and left the ones that are not, so we can focus on solving them. |
@dalthviz, please take care of this one. |
Note: Seems like the majority of cases listed here are not working as expected due to a change over the upper limit of jedi done at 60ae3c6 (so it affects Spyder >= 5.5.0). When checking things with jedi 0.18.2 and latest master things work except for:
|
Thanks for digging into this @dalthviz! Let's leave it for 6.0.1 then because it's not so simple to fix (you'll need to run
Correct, that's the only way to fix that. But that will work only if you've run your code first.
Yeah, I think that's a good idea and you can implement it for 6.0.0 because it doesn't sound too hard to fix. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
pandas identifiers for Series and DataFrame don't display properly in the script editor. docstring for a class in a standard module does not display when module and class name are the same e.g. datetime.datetime or time.time
What steps reproduce the problem?
a. np. # display correctly
b. x. # display correctly
c. pd. # display correctly
d. df. # display correctly Spyder 5, don't display Spyder 6
e. pd.Series. # display correctly Spyder 5, don't display Spyder 6
f. pd.DataFrame. # display correctly Spyder 5, don't display Spyder 6
g. df.x. # Series accessed from DataFrame as an attribute, don't display Spyder 5 or 6
h. df['x']. # Series accessed from DataFrame as an index, don't display Spyder 5 or 6
i. datetime. # Identifiers display correctly Spyder 5 or 6
j. datetime.timedelta # Identifiers display correctly Spyder 5 or 6
k. datetime.timedelta() # Docstring displays correctly Spyder 5 or 6
l. datetime.datetime. # identifiers display correctly Spyder 5 or 6
m. datetime.datetime() # Docstring does not display Spyder 5 or 6
n. time. # identifiers display correctly Spyder 5 or 6
o. time.sleep() # Docstring displays correctly Spyder 5 or 6
p. time.time() # Docstring does not display Spyder 5 or 6
q. time.time_ns() # Docstring does not display Spyder 5 or 6
What is the expected output? What do you see instead?
d, e and f should work in Spyder 6 like Spyder 5.
g and h should display identifiers of e.
m, p and q should display docstring.
Paste Traceback/Error Below (if applicable)
Versions
Spyder 5
Spyder 6
Dependencies
Spyder 5
Spyder 6
The text was updated successfully, but these errors were encountered: