150
98

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jupyter notebookで列をすべて表示したい

Posted at

Jupyter Notebookでデータフレームを表示すると、
表示列が多すぎる時、途中の列が「・・・」という表示になってしまう。
省略せずに全部表示させたい時にはこれ。

.python
import pandas as pd

#現在の最大表示列数の出力
pd.get_option("display.max_columns")

#最大表示列数の指定(ここでは50列を指定)
pd.set_option('display.max_columns', 50)

以下で、最大表示行数の指定もできる。

.python
import pandas as pd

#現在の最大表示行数の出力
pd.get_option("display.max_rows")

#最大表示行数の指定(ここでは50行を指定)
pd.set_option('display.max_rows', 50)
150
98
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
150
98

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?