title: Pandas: creating an indexed time series [starting from 100] from returns data
body: <p>I have data on logarithmic returns of a variable in a Pandas DataFrame. I would like to turn these returns into an indexed time series which starts from 100 (or any arbitrary number). This kind of operation is very common for example when creating an inflation index or when comparing two series of different magnitude:</p>
  
  <p><a href="https://i.stack.imgur.com/guRe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/guRe4.png" alt="Pic 1: Example of indexing two series"></a></p>
  
  <p>So the first value in, say, Jan 1st 2000 is set to equal 100 and the next value in Jan 2nd 2000 equals 100 * exp(<em>return_2000_01_02</em>) and so on. Example below:</p>
  
  <p><a href="https://i.stack.imgur.com/rwlF9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rwlF9.png" alt="Table 1: Example of returns and an indexed time series"></a></p>
  
  <p>I know that I can loop through rows in a Pandas DataFrame using <strong>.iteritems()</strong> as presented in this SO question:
  <a href="https://stackoverflow.com/questions/10729210/iterating-row-by-row-through-a-pandas-dataframe">iterating row by row through a pandas dataframe</a></p>
  
  <p>I also know that I can turn the DataFrame into a numpy array, loop through the values in that array and turn the numpy array back to a Pandas DataFrame. The <strong>.as_matrix()</strong> method is explained here:
  <a href="http://pandas.pydata.org/pandas-docs/version/0.13.1/generated/pandas.Series.html" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/version/0.13.1/generated/pandas.Series.html</a></p>
  
  <p>An even simpler way to do it is to iterate the rows by using the Python and numpy <strong>indexing operators []</strong> as documented in Pandas indexing:
  <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/indexing.html</a></p>
  
  <p>The problem is that all these solutions (except for the iteritems) work "outside" Pandas and are, according to what I have read, inefficient. </p>
  
  <p>Is there a way to create an indexed time series using purely Pandas? And if not, could you, please, suggest the most efficient way to do this. Finding solutions is surprisingly difficult, because index and indexing have a specific meaning in Pandas, which I am not after this time. </p>