title: How to change/add chart data series in python-pptx?
body: <p>I'm trying to set data in an existing chart using python-pptx.</p>
  
  <pre><code>from pptx import Presentation
  pres_path = "C:\\pres.pptx"
  pres = Presentation(pres_path)
  
  pres.slides[3].shapes[4].chart.series[0].values
  </code></pre>
  
  <p>(92.0, 330.0, 309.0, 313.0, 356.0, 421.0, 457.0)</p>
  
  <pre><code>pres.slides[3].shapes[4].chart.series[0].values = (1,2,3)
  
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    AttributeError: can't set attribute
  </code></pre>
  
  <p>There's a method mentioned in the documentation which seems relevant, but I can't understand how to use it:
  <a href="http://python-pptx.readthedocs.org/en/latest/_modules/pptx/chart/data.html" rel="nofollow">http://python-pptx.readthedocs.org/en/latest/_modules/pptx/chart/data.html</a></p>
  
  <pre><code>pres.slides[3].shapes[4].chart.replace_data((1,2,3))
  
  
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\site-packages\pptx\chart\chart.py", line 119, in     replace_data
      _SeriesRewriter.replace_series_data(self._chartSpace, chart_data)
    File "C:\Python27\lib\site-packages\pptx\chart\chart.py", line 197, in replace_series_data
  sers = cls._adjust_ser_count(chartSpace, len(chart_data.series))
  AttributeError: 'tuple' object has no attribute 'series'
  </code></pre>
  
  <p>I'd appreciate any help you can provide.
  Thanks!</p>