Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to print out panda dataframes in vscode

In a terminal, i can print out the value of a dataframe and it prints out in a readable way

enter image description here

Where as in vscode, when running in a debugger, it prints out as one long row and is hard to read.

enter image description here

any suggestions on how to make it more readable on vscode?

like image 608
foobar8675 Avatar asked Feb 24 '18 01:02

foobar8675


2 Answers

I ended up using the vscode Python:Terminal (external), and within the debug environment, I can do a print(df) which reads nicely within the terminal.

like image 185
foobar8675 Avatar answered Sep 18 '22 19:09

foobar8675


Try Changing the terminal of VScode to 'git bash' in the terminal tab. It has worked for me.

screenshot1

screenshot2

like image 27
galibhkhan Avatar answered Sep 21 '22 19:09

galibhkhan