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
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