Examples
import numpy as np import pandas as pd
df = pd.DataFrame({'Q': [0, 4, 5, np.nan, 8]}) df
df.ewm(com=0.4).mean()