Skip to main content
本文に 376 文字追加
ソース リンク
metropolis
  • 6,705
  • 2
  • 6
  • 16

display()関数を使うのはどうでしょうか28 Jupyter Notebook Tips, Tricks, and Shortcuts for Data Science から引用します

import pandas as pd

lst1=[[1,2,3],[4,5,6]]
lst2=[[2,3,4],[5,6,7]]

display(pd.DataFrame(lst1))
display(pd.DataFrame(lst2))

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"

displaydisplay

display()関数を使うのはどうでしょうか

import pandas as pd

lst1=[[1,2,3],[4,5,6]]
lst2=[[2,3,4],[5,6,7]]

display(pd.DataFrame(lst1))
display(pd.DataFrame(lst2))

display

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

display()関数を使うのはどうでしょうか。

import pandas as pd

lst1=[[1,2,3],[4,5,6]]
lst2=[[2,3,4],[5,6,7]]

display(pd.DataFrame(lst1))
display(pd.DataFrame(lst2))

display