本文整理汇总了Python中pythalesians.timeseries.calcs.timeseriescalcs.TimeSeriesCalcs.average_by_hour_min_of_day_pretty_output方法的典型用法代码示例。如果您正苦于以下问题:Python TimeSeriesCalcs.average_by_hour_min_of_day_pretty_output方法的具体用法?Python TimeSeriesCalcs.average_by_hour_min_of_day_pretty_output怎么用?Python TimeSeriesCalcs.average_by_hour_min_of_day_pretty_output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythalesians.timeseries.calcs.timeseriescalcs.TimeSeriesCalcs
的用法示例。
在下文中一共展示了TimeSeriesCalcs.average_by_hour_min_of_day_pretty_output方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: time_of_day_seasonality
# 需要导入模块: from pythalesians.timeseries.calcs.timeseriescalcs import TimeSeriesCalcs [as 别名]
# 或者: from pythalesians.timeseries.calcs.timeseriescalcs.TimeSeriesCalcs import average_by_hour_min_of_day_pretty_output [as 别名]
def time_of_day_seasonality(self, data_frame, years=False):
tsc = TimeSeriesCalcs()
if years is False:
return tsc.average_by_hour_min_of_day_pretty_output(data_frame)
set_year = set(data_frame.index.year)
year = sorted(list(set_year))
intraday_seasonality = None
commonman = CommonMan()
for i in year:
temp_seasonality = tsc.average_by_hour_min_of_day_pretty_output(data_frame[data_frame.index.year == i])
temp_seasonality.columns = commonman.postfix_list(temp_seasonality.columns.values, " " + str(i))
if intraday_seasonality is None:
intraday_seasonality = temp_seasonality
else:
intraday_seasonality = intraday_seasonality.join(temp_seasonality)
return intraday_seasonality