title: Simple Python Pandas EMA (ewma)?
body: <p>I wrote some code to build my own EMA/MACD, but have decided to give Pandas a try instead.</p>
  
  <p>I am using this website below as a basic understanding of EMA and trying to get pandas to give me the same answers to be sure I am using pandas correctly:</p>
  
  <p><a href="http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_averages" rel="nofollow noreferrer">http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_averages</a></p>
  
  <p>And here is the chart with the data that Im working with.</p>
  
  <p><a href="https://i.stack.imgur.com/DOgat.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DOgat.png" alt="enter image description here"></a></p>
  
  <p>Here is the code I'm trying to get to work, but it gives me different output than the 10-day EMA column</p>
  
  <pre><code>import pandas as pd
  
  data=[22.27,22.19,22.08,22.17,22.18,22.13,22.23,22.43,22.24,22.29,22.15,22.39,22.38,22.61,23.36,24.05,23.75,23.83]
  
  df=pd.Series(data)
  
  pd.ewma(df, span=10)
  </code></pre>
  
  <p>I've also tried this with no luck.</p>
  
  <pre><code>pd.ewma(df, span=10, min_periods=10)
  </code></pre>
  
  <p>Any help is appreciated.</p>