pandas 如何在 vscode 中打印出熊猫数据帧
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48958312/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to print out panda dataframes in vscode
提问by foobar8675
In a terminal, i can print out the value of a dataframe
and it prints out in a readable way
在终端中,我可以打印出 a 的值dataframe
并以可读的方式打印出来
Where as in vscode, when running in a debugger, it prints out as one long row and is hard to read.
在 vscode 中,当在调试器中运行时,它会打印出一长行并且难以阅读。
any suggestions on how to make it more readable on vscode?
关于如何使其在 vscode 上更具可读性的任何建议?
采纳答案by galibhkhan
Try Changing the terminal of VScode to 'git bash' in the terminal tab. It has worked for me.
尝试在终端选项卡中将 VScode 的终端更改为“git bash”。它对我有用。
回答by foobar8675
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.
我最终使用了 vscode Python:Terminal (external)
,并且在调试环境中,我可以print(df)
在终端中很好地读取。