-
Notifications
You must be signed in to change notification settings - Fork 137
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
Bug report: printed dataframes do not collapse in debugger #889
Comments
Note that |
Thank you @int19h! In the debugger console:
|
What happens if you open the standard Python REPL (i.e. just run |
That is showing me a collapsed dataframe, as intended,
|
Very interesting, thank you! @fabioz, is this the case of safe-repr code not being on par with the stock pandas repr? |
What happens is that we now customize pandas ourselves and our limits are (much) bigger than the default pandas values (I did those when checking a case where the user had limitless limits but it seems I didn't check that the defaults are in general based on the size of the terminal, which is definitely better). i.e.: as a part of fixing #695 we now customize pandas with:
I guess this should be changed again so that if the setting that the user has configured is lower than that we use the lower one. I'll do the update. In the meanwhile setting an environment such as:
Should make things closer to the default config. |
Thank you for the clarification, @fabioz! Your suggestion resolved my issue. |
Description of the bug
When I try to print a Pandas Dataframe in the debug console with
v2022.4.0
, it prints the first 150 and last 150 rows and all the columns of the dataframe. This is very slow and makes it pretty much impossible for me to actually see the DataFrame contents. It should be showing the first and last 5 rows and a small number of columns.How to reproduce this bug
(it prints the first and last 150 rows, and all columns).
Note that outside of the debug console, e.g.,
print(df)
works just fine and prints a collapsed DataFrame, as expected:What would I expect
The debugger should collapse the Pandas DataFrame, as:
This is what I am seeing when using
print(df)
in the code. This is also the behavior I am seeing in the debug console with versionv2022.2.1924087327
.What have I tried so far
debugpy==1.5.1
anddebugpy==1.5.0
.pandas
versions.pd.reset_option('display.max_rows')
.None of this resolved the issue. The only thing that resolved it is downgrading
vscode-python
tov2022.2.1924087327
. Hence, I have posted this bug here rather than in thedebugpy
repository.The text was updated successfully, but these errors were encountered: