Показать все столбцы после запуска df.columns - PullRequest
0 голосов
/ 24 апреля 2018

У меня в настоящее время есть 120 столбцов в моем DataFrame. Когда я выполню

df.columns 

Я получаю усеченный список, в котором я вижу только 20 вместо 120 столбцов:

Index(['Reporting_FI', 'Reporting_FI_identification',
   'Reporting_FI_identification_type', 'Reporting_FI_street_address_1',
   'Reporting_FI_street_address_2', 'Reporting_FI_city',
   'Reporting_FI_state', 'Reporting_FI_postal_code',
   'Reporting_FI_country_code', 'Transaction_date',
   ...
   'FI_country_code_3', 'FI_name_4', 'FI_branch_4', 'FI_identification_4',
   'FI_identification_type_4', 'FI_account_number_4', 'FI_city_4',
   'FI_state_4', 'FI_country_code_4', 'Additional_infomation_2'],
  dtype='object', length=120)

Как мне настроить это, чтобы отобразить все 120?

Я не ищу:

pd.set_option('display.max_columns', 120)

Спасибо

1 Ответ

0 голосов
/ 24 апреля 2018

Один простой способ - преобразовать в list перед печатью:

res = df.columns.tolist()

print(res)
...