[!NOTE] The plugin is broken in PyCharm 2024.2.1, but works again in PyCharm >= 2024.2.3.
In case of problems, you can use the following workaround: plugin fix
Using the IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "Styled DataFrame Viewer" > Install
JetBrains Marketplace:
https://plugins.jetbrains.com/plugin/16050-python-styled-dataframe-viewer
View, sort and filter DataFrames
or a Python dict
when debugging.
Note: The plugin requires one of the supported Python DataFrame libraries:
pandas
polars
The plugin can be used to view DataFrames from a Debug Session
or a Python Console
.
Generate a DataFrame
:
# code for pandas
import pandas as pd
df = pd.DataFrame.from_dict({"a": range(200), "b": range(100, 300), "c": range(200, 400)})
breakpoint()
# code for polars
import polars as pl
df = pl.from_dict({"a": range(200), "b": range(100, 300), "c": range(200, 400)})
breakpoint()
Run the code in debug mode in your JetBrains IDE. The program stops at the line with the breakpoint()
command.
Select the Threads & Variables
tab of the debugger (as seen in the screenshot below).
Right-click on df
to open the context menu. Select View as Styled DataFrame
.
This opens a new window which shows the DataFrame
df
:
Enter the code to generate a DataFrame
:
# code for pandas
import pandas as pd
df = pd.DataFrame.from_dict({"a": range(200), "b": range(100, 300), "c": range(200, 400)})
# code for polars
import polars as pl
df = pl.from_dict({"a": range(200), "b": range(100, 300), "c": range(200, 400)})
Right-click on df
, in the variable view, to open the context menu. Select View as Styled DataFrame
.
This opens a new window which shows the DataFrame
df
: