PyDev FutureWarning Django console
When using Pandas in the Django/Python Console I get the following error:
/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/_pydev_imports_tipper.py:213: FutureWarning: _AXIS_NAMES has been deprecated.
obj = getattr(obj_to_complete, d)
/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/_pydev_imports_tipper.py:213: FutureWarning: _AXIS_NUMBERS has been deprecated.
obj = getattr(obj_to_complete, d)
This happens on nearly any action that accesses a DataFrame through an index or attribute. Such as:
df.columns
When I read in a csv, that is approximately 30k rows, this issue is consistently reproducible. There is some variability on how often it happens after the first warning, and the amount of time it takes to return results from actions on the DataFrame. First time calling a method will take in excess of 3 seconds, but subsequent calls of similar operations may be near normal or sometimes longer, with/without the warning.
Any input on what to do to resolve or avoid this issue would be wonderful. This seems to only happen in my Django projects.
Environment:
PyCharm 2020.2 (Professional Edition)
Build #PY-202.6397.98, built on July 27, 2020
Runtime version: 11.0.7+10-b944.20 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.5
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Non-Bundled Plugins: IdeaVIM, net.seesharpsoft.intellij.plugins.csv, com.jetbrains.intellij.datalore, R4Intellij
MacBook Pro 2019, 2.6GHz i7, 16GB 2400MHz DDR4
Python: 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)
Django: 3.0.9 and 3.1
pandas: 1.10
No additional packages outside of the defaults for a Django project installed.
请先登录再写评论。
Same issue. Really annoying, literally floods the console with these warnings when I want to concentrate on what's going on with dataframes.
Hi,
I can't reproduce it in my environment.
Does it happen in a brand new project?
Would it be possible to provide a project along with steps for reproducing the problem?
Hi Sergey,
It does happen in a brand new Django project, and has cropped up in my other only barely older Django projects.
How would you like me to provide a project? I could create a github repo, but it honestly might be overkill as just creating a new Django project and installing pandas seems to reproduce it. (using the pathway: File > New Project > [select Django in left side panel of new window] > create)
[old text edited out - incorrectly stated it seemed to be Mac only]
EDIT! It appears on my Windows computer as well. I was running an older version of PyCharm on my Windows computer and the warning did not occur. With version 2020.2 the warning occurs.
Prior version on Windows with no warnings:
PyCharm 2020.1.4 (Professional Edition)
Build #PY-201.8743.11, built on July 21, 2020
Updated to the following and warning starts to occur:
PyCharm 2020.2 (Professional Edition)
Build #PY-202.6397.98, built on July 27, 2020
More details on environment:
Using venv
pip freeze output:
Another interesting thing I just noticed is that the warning and delay sometimes only crops up on the first time running a command on a singular file. As in, repeating steps on the same file did not reproduce the warning, even when I stoped or restarted the Console. Example:
Hope this helps. I'll play around with it a bit more and report any more pertinent details if I come across them.
Edit:
The warnings pop up often and every time I do something like df.columns in my larger projects. Brand new projects it's a lot more variable on when it happens on repeated operations, but on established/larger projects it appears to happen much more often.
Got it, thanks!
It's reproducible with pandas==1.1.0. I filed a bug to our issue tracker https://youtrack.jetbrains.com/issue/PY-43972, please feel free to vote and comment.
This error is also reproducible with pandas==1.1.1
Hi, has it been resolved?
According to https://youtrack.jetbrains.com/issue/PY-43972, it's been resolved in 2020.2.2
Let me know if the issue is still reproduced in the latest version.
Hi, thanks for the response, I confirm it works great now (2020.3)