title: replacing np.float64 nan in pandas
body: <p>I have a pandas dataframe as below:</p>
  <pre><code>&gt;&gt;&gt; df.head()
              timestamp  count_200  count_201  count_503  count_504   mean_200    mean_201  mean_503  mean_504  count_500
  0 2020-09-18 09:00:00     4932.0       51.0        NaN        NaN  59.501014   73.941176       0.0       0.0          0
  1 2020-09-18 10:00:00     1697.0        9.0        NaN        NaN  57.807896   69.111111       0.0       0.0          0
  2 2020-09-18 11:00:00     6895.0        6.0        2.0        1.0  54.037273   98.333333      33.0    1511.0          0
  3 2020-09-18 12:00:00     2943.0       97.0        NaN        NaN  74.334353   74.268041       0.0       0.0          0
  4 2020-09-18 13:00:00     2299.0       43.0        NaN        NaN  70.539800  102.302326       0.0       0.0          0
  </code></pre>
  <p>fillna does no replace the NaN</p>
  <pre><code>&gt;&gt;&gt; df.fillna(0)
                timestamp  count_200  count_201  count_503  count_504    mean_200    mean_201    mean_503  mean_504  count_500
  0   2020-09-18 09:00:00     4932.0       51.0        NaN        NaN   59.501014   73.941176    0.000000     0.000          0
  1   2020-09-18 10:00:00     1697.0        9.0        NaN        NaN   57.807896   69.111111    0.000000     0.000          0
  2   2020-09-18 11:00:00     6895.0        6.0        2.0        1.0   54.037273   98.333333   33.000000  1511.000          0
  3   2020-09-18 12:00:00     2943.0       97.0        NaN        NaN   74.334353   74.268041    0.000000     0.000          0
  4   2020-09-18 13:00:00     2299.0       43.0        NaN        NaN   70.539800  102.302326    0.000000     0.000          0
  </code></pre>
  <p>But if we access just one row, fillna on the resulting series works as expected:</p>
  <pre><code>&gt;&gt;&gt; df.iloc[0]
  timestamp    2020-09-18 09:00:00
  count_200                   4932
  count_201                     51
  count_503                    NaN
  count_504                    NaN
  mean_200                  59.501
  mean_201                 73.9412
  mean_503                       0
  mean_504                       0
  count_500                      0
  Name: 0, dtype: object
  
  &gt;&gt;&gt; df.iloc[0].fillna(0)
  timestamp    2020-09-18 09:00:00
  count_200                   4932
  count_201                     51
  count_503                      0
  count_504                      0
  mean_200                  59.501
  mean_201                 73.9412
  mean_503                       0
  mean_504                       0
  count_500                      0
  Name: 0, dtype: object
  </code></pre>
  <p>What is going on here?</p>
  <pre><code>&gt;&gt;&gt; df.iloc[0,3]
  nan
  &gt;&gt;&gt; type(df.iloc[0,3])
  &lt;class 'numpy.float64'&gt;
  </code></pre>
  <p>Pandas recognises as a na:</p>
  <pre><code>&gt;&gt;&gt; df.isna()
       timestamp  count_200  count_201  count_503  count_504  mean_200  mean_201  mean_503  mean_504  count_500
  0        False      False      False       True       True     False     False     False     False      False
  1        False      False      False       True       True     False     False     False     False      False
  2        False      False      False      False      False     False     False     False     False      False
  3        False      False      False       True       True     False     False     False     False      False
  4        False      False      False       True       True     False     False     False     False      False
  </code></pre>
  <p>But with numpys inbuild function this can be fixed in pandas:</p>
  <pre><code>&gt;&gt;&gt; df.head().apply(np.nan_to_num)
              timestamp  count_200  count_201  count_503  count_504   mean_200    mean_201  mean_503  mean_504  count_500
  0 2020-09-18 09:00:00     4932.0       51.0        0.0        0.0  59.501014   73.941176       0.0       0.0          0
  1 2020-09-18 10:00:00     1697.0        9.0        0.0        0.0  57.807896   69.111111       0.0       0.0          0
  2 2020-09-18 11:00:00     6895.0        6.0        2.0        1.0  54.037273   98.333333      33.0    1511.0          0
  3 2020-09-18 12:00:00     2943.0       97.0        0.0        0.0  74.334353   74.268041       0.0       0.0          0
  4 2020-09-18 13:00:00     2299.0       43.0        0.0        0.0  70.539800  102.302326       0.0       0.0          0
  </code></pre>
  <p>Is this expected, I can't find this documented. What am I missing? Is this a bug?</p>