title: TypeError: "value" parameter must be a scalar, dict or Series, but you passed a "DataFrame" in Python
body: <p>Currently I am breaking on subjected issue. I am not sure why is it breaking and what are the amendments required.</p>
  
  <p>Code:</p>
  
  <pre><code>table = df.pivot_table(values='LoanAmount', index='Self_Employed' ,columns='Education', aggfunc=np.median)
  
  def fage(x):
      return table.loc[x['Self_Employed'],x['Education']]
  
  #Replacing missing values
  
  df['LoanAmount'].fillna(df[df['LoanAmount'].isnull()].apply(fage,axis=1),inplace =True) 
  </code></pre>
  
  <p>Output:</p>
  
  <p>[15]: df['LoanAmount'].fillna(df[df['LoanAmount'].isnull()].apply(fage,axis=1),inplace =True)</p>
  
  <p>Traceback (most recent call last):</p>
  
  <pre><code> File "&lt;ipython-input-15-dadf94659135&gt;", line 1, in &lt;module&gt;
      df['LoanAmount'].fillna(df[df['LoanAmount'].isnull()].apply(fage,axis=1),inplace =True)
  
    File "/home/aryabhatta/anaconda3/lib/python3.6/site-packages/pandas/core/series.py", line 3422, in fillna
      **kwargs)
  
    File "/home/aryabhatta/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py", line 5400, in fillna
      '"{0}"'.format(type(value).__name__))
  
  TypeError: "value" parameter must be a scalar, dict or Series, but you passed a "DataFrame"
  </code></pre>