Change maximum columns to display

import pandas as pd
pd.options.display.max_columns = 9999 
df = pd.read_csv('california_housing_train.csv')
df.head()
longitude latitude housing_median_age total_rooms total_bedrooms population households median_income median_house_value
0 -114.31 34.19 15.0 5612.0 1283.0 1015.0 472.0 1.4936 66900.0
1 -114.47 34.40 19.0 7650.0 1901.0 1129.0 463.0 1.8200 80100.0
2 -114.56 33.69 17.0 720.0 174.0 333.0 117.0 1.6509 85700.0
3 -114.57 33.64 14.0 1501.0 337.0 515.0 226.0 3.1917 73400.0
4 -114.57 33.57 20.0 1454.0 326.0 624.0 262.0 1.9250 65500.0
pd.options.display.max_columns = 6
df.head()
longitude latitude housing_median_age ... households median_income median_house_value
0 -114.31 34.19 15.0 ... 472.0 1.4936 66900.0
1 -114.47 34.40 19.0 ... 463.0 1.8200 80100.0
2 -114.56 33.69 17.0 ... 117.0 1.6509 85700.0
3 -114.57 33.64 14.0 ... 226.0 3.1917 73400.0
4 -114.57 33.57 20.0 ... 262.0 1.9250 65500.0

5 rows × 9 columns