Skip to content

Instantly share code, notes, and snippets.

@fieldAbyss
Last active August 10, 2018 07:18
Show Gist options
  • Save fieldAbyss/f0c2fc249a0a2909d2664ed1ae311b34 to your computer and use it in GitHub Desktop.
Save fieldAbyss/f0c2fc249a0a2909d2664ed1ae311b34 to your computer and use it in GitHub Desktop.
import pandas as pd
period = 14
# pandas 0.23.4
df_close.rolling(period).max()
df_close.rolling(period).min()
df_close.rolling(period).mean()
df_close.rolling(period).std()
# pandas 0.17.0
pd.rolling_max(df_close, period)
pd.rolling_min(df_close, period)
pd.rolling_mean(df_close, period)
pd.rolling_std(df_close, period)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment