ValueError: Incompatible indexer with Series
<p>I am trying to pull a cell from a Pandas <code>DataFrame</code> using it's index, and saving to another <code>DataFrame</code>.</p>

<pre><code>for n in range(len(df)):    
    yesterday, beach= df.loc[n,['Full_date','Beach']]
    ts=datetime.datetime.strptime(yesterday,'%Y-%m-%d')
    day_sub = ts-td(days=1)
    two_days = str(day_sub.strftime('%Y-%m-%d'))
    try:
        df.loc[n,'2_day_prior_Escherichia.coli']=pd.to_numeric(df_beach.loc[(two_days,beach),'Mean'])
    except:
        df.loc[n,'2_day_prior_Escherichia.coli']=np.nan
</code></pre>

<p>Where <code>Full_date</code> is in a <code>YYYY-MM-DD</code> format, <code>Beach</code> is a string of the name of a beach, and <code>Mean</code> is an object that is essentially a float.</p>

<p>When I run this code the </p>

<pre><code>pd.to_numeric(df_beach.loc[(two_days,beach),'Mean'])
</code></pre>

<p>comes up with a <code>ValueError</code>: </p>

<blockquote>
  <p>Incompatible indexer with Series.</p>
</blockquote>

<p>Any idea as to why this is, and how I can fix it?</p>