Jupyter显示整个cell的输出,而不需print()
Jupyter输出不用print()真是非常方便,但是通常情况只会输出最后一个结果。如果想要输出一段代码的很多中间值,同时不使用print()呢?
在jupyter里加入:
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
举个简单例子:
Jupyter显示输出结果的所有行和列
pd.options.display.max_columns = None
pd.options.display.max_rows = None