average table

This commit is contained in:
Alagris 2021-06-22 11:05:13 +02:00
parent e5df1f30ac
commit e26ce21899

View File

@ -214,6 +214,11 @@ def change_time_period(selectedData):
to_time = selected_stock_in_table_df.index.max()
from_time = round_to_nearest_weekday(from_time)
to_time = round_to_nearest_weekday(to_time)
full_table_in_time_period = fullTableDf.loc[from_time:to_time]
mean = full_table_in_time_period.mean(axis=0)
mean = mean.xs('Close', level=0)
std = full_table_in_time_period.std(axis=0)
std = std.xs('Close', level=0)
time_period = selected_stock_in_table_df.loc[from_time:to_time]
mean = time_period.mean(axis=0)
std = time_period.std(axis=0)