https://colab.research.google.com/drive/10UOqGEU6uIput8Ebn4KOpkdXogMPsxO3#scrollTo=kQYHthizIhFQ
#ex)
# daily data ---> yearly data
df.resample(rule='A').mean()
#ex)
def first_day(entry):
#is there an entry?
if len(entry) != 0:
#if so, return first entry
return entry[0]
df.resample(rule='A').apply(first_day)
df.resample(rule='A').mean().plot.bar(color=['#1f77e4']);
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.shift.html
rolling 역할: window size를 만들어서 window size만큼 연산 수행
#ex)
df.rolling(window=7).mean()
#ex)
df['Close'].expanding().mean().plot(figsize=(12,5))