title: How can I use math.sin() in fillna in pandas
body: <p>I tried to use the math.sin() function in fillna but I failed:</p>
  
  <pre><code>data['Sensor #1'].fillna(math.sin(data["Sample #"] * parameter), inplace = True)
  </code></pre>
  
  <p>Is there any way I can fix that?</p>
  
  <p>Here's the error message:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-145-9199336c2860&gt; in &lt;module&gt;()
       11 
       12 
  ---&gt; 13 data['Sensor #1'].fillna(math.sin(data["Sample #"] * parameter), inplace = True)
       14 data['Sensor #2'].fillna(lambda r: r["Sample #"]**-parameter, inplace = True)
       15 # drop the row that has empty value(s) because we want to find anomalies
  
  /anaconda3/lib/python3.6/site-packages/pandas/core/series.py in wrapper(self)
      115             return converter(self.iloc[0])
      116         raise TypeError("cannot convert the series to "
  --&gt; 117                         "{0}".format(str(converter)))
      118 
      119     return wrapper
  
  TypeError: cannot convert the series to &lt;class 'float'&gt;
  </code></pre>