Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame({'Q': [0, 2, 4, np.nan, 6]})
df
Out[2]:
Q
0 0.0
1 2.0
2 4.0
3 NaN
4 6.0

In [3]:
df.ewm(com=0.3).mean()
Out[3]:
Q
0 0.000000
1 1.625000
2 3.474654
3 3.474654
4 5.838369