I do not like the presentation format that separates my dataframe into two rows. This problem also appears in my debug console, but it was not like that some days ago. I clicked the "…" on the left of the output and select "change presentation", but VSCode only gives me one option ( shown in the last image). It had about three options before, but they are not here anymore.
I followed this answer to change my settings.json, but it makes no difference. What can I do to have all the columns display in one row?
My settings.json is
{
"workbench.colorTheme": "Default Dark+",
"[python]": {
"editor.formatOnType": true
},
"git.autofetch": true,
"notebook.displayOrder": [
"image/png",
"text/plain"
]
}
2
Answers
An existing problem on github. The output will be unreadable if working with wide dataframes.
One feasible approach is to use the data viewer by clicking Variables.
Then you could get the table as an alternative. I’ve submitted your original problem as a feature request to developer on github.
Instead of using:
just use:
It will print your csv in a prettier format without dataframe separation, but make sure that variable is at the end of the code.
If the dataframe is in collapse mode, you can expand/show all columns with this
pandas
setup: