title: How do I apply my function which returns a pandas dataframe, to a range of inputs so it returns individual dataframes?
body: <p>I am using the alpha_vantage API in python which returns a Pandas dataframe table.</p>
  <p>I have written a function, below, which takes a stock name, resets the index of the dataframe and renames it. How do I apply this function to a few inputs so it brings back individual dataframes for them? At the moment, I have to do this manually and run the function individually for each input.</p>
  <p>Would it work if I create a pandas series with the list of stocks, and apply the function to the series?</p>
  <pre><code>def get_stock(ticker):
      stock, meta_data = ts.get_daily_adjusted(symbol=ticker, outputsize='compact')
      ticker = pd.DataFrame(stock)
      ticker = ticker.reset_index()
      return ticker
  </code></pre>
  <p>To make this dataframe available outside of the function, I was running it as below:</p>
  <pre><code>example = get_stock('XX')
  </code></pre>
  <p><code>example</code> is therefore the returned dataframe variable.</p>
  <p>Thanks!</p>