Closed 8DanB closed 8 months ago
Hi, can you please provide the following things for me so that I can have a look?
Pycharm Smart Execute
, a detailed description would be very helpful. For example, I have no idea what exactly is meant by: I have setup Pycharm to run code line-by-line using the plugin "Pycharm Smart Execute".
PyCharm version: PyCharm 2023.3.3 (Community Edition) PyCharm Smart Execute: installed plugin 0.3.2 Guo Ci Python Styled DataFrameViewer: 0.14.0 cms.rendner polars: 0.20.7
Snippet: `import polars as pl
data = {'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'City': ['New York', 'San Francisco', 'Los Angeles']}
df = pl.DataFrame(data)
print(df) `
Description: Smart Execute allows me to run code line-by-line in Python, as opposed to using the debugger. I have keymaps setup so "CTRL + Enter" will "Execute cell in console, move to next code region" within the Settings -> Keymap section of Pycharm.
I am an R-user -- R studio has the functionality to run a line of code, inspect result, then another line, inspect, etc. I have been able to mirror this with Pycharm, however I am not able to view the Dataframe when I want to see it in the variable explorer.
Thank you very much. I have managed to reproduce the described behavior.
The problem is independent of polars
, it also exists for pandas
.
My plugin requires an existing debugSession
to work correctly. In your scenario the plugin can't get a debugSession
. PyCharm returns null
for XDebuggerManager.getInstance(project).currentSession
.
The action Evaluate Expression
, provided by PyCharm, is disabled in case no debugSession
is available. I will also disable my View as Styled DataFrame
action in this case so that it is clear to users.
Thank you for reporting the problem.
@8DanB I have released a new version (v0.15.0) that also works with the Python Console
.
I cannot view a polars dataframe using "View as Styled Dataframe" when I try and view a polars dataframe outside of the debugger in Pycharm.
When using the debugger, it works fine. However, I have setup Pycharm to run code line-by-line using the plugin "Pycharm Smart Execute". When I try and view the Styled Dataframe nothing pops up with a polar dataframe.