Pandas dataframe short traceback #3001
Unanswered
lainisourgod
asked this question in
Show and tell
Replies: 1 comment
-
Also, just realized you can also set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I had a problem for a while that rich traceback with show_locals=True tended to produce reeeealy long tracebacks because of dataframe printing that printed 10+ wide columns with wraping them on multiple lines, and that is for 10+ rows of dataframe, and 10+ frames of traceback. So it was really annoying to look through traceback.
The solution I found is:

pd.set_option("display.max_columns", 3)
. This way traceback is pretty lean, and I don't really miss info because I rarely need to debug the whole datarame content.Code to reproduce:
Beta Was this translation helpful? Give feedback.
All reactions