title: Tracking Error on a number of benchmarks
body: <p>I'm trying to calculate tracking error for a number of different benchmarks versus a fund that I'm looking at (tracking error is defined as the standard deviation of the percent difference between the fund and benchmark).  The time series for the fund and all the benchmarks are all in a data frame that I'm reading from an excel on file and what I have so far is this (with the idea that arg1 represents all the benchmarks and is then applied using applymap), but it's returning a KeyError, any suggestions?</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  data = pd.read_excel('File_Path.xlsx')
  
  def index_analytics(arg1):
      tracking_err = np.std((data['Fund'] - data[arg1]) / data[arg1])
      return tracking_err
  
  data.applymap(index_analytics)
  </code></pre>