Skip to main content
2 / 2
本文に 376 文字追加
metropolis
  • 6,705
  • 2
  • 6
  • 16

28 Jupyter Notebook Tips, Tricks, and Shortcuts for Data Science から引用します。

2. Pretty Display of Variables

What is known less, is that you can alter a modify the ast_note_interactivity kernel option to make Jupyter do this for any variable or statement on its own line, so you can see the value of multiple statements at once.

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

display

metropolis
  • 6,705
  • 2
  • 6
  • 16