1pd.set_option('display.max_columns', None)
2pd.set_option('display.max_rows', None)
3#used for expanding the no o viible columns of dataframe
1import pandas as pd
2pd.set_option('display.max_rows', 500)
3pd.set_option('display.max_columns', 500)
4pd.set_option('display.width', 1000)
5
1pd.set_option('display.max_columns', 200)
2pd.set_option('display.max_rows', 100)
3pd.set_option('display.min_rows', 100)
4pd.set_option('display.expand_frame_repr', True)
5
1# with HTML output
2from IPython.display import display_html
3
4def display_frames(frames, num_space=0):
5 t_style = '<table style="display: inline;"'
6 tables_html = [df.to_html().replace('<table',t_style)
7 for df in frames]
8 space = ' ' * num_space
9 display_html(space.join(tables_html),raw=True)
10
11years = 2016,2017,2018 # initial data.
12stock_tables = [pd.read_csv('stocks_{}.csv'.format(year))
13 for year in years]
14
15display_frames(stock_tables,10)
16stocks_2016, stocks_2017, stocks_2018 = stock_tables