title: Python 2D Matrix Interpolation
body: <p>I have a matrix with some Float-values and a lot of NaN values. Now I want to interpolate the NaN-values.</p>
  
  <p>The matrix looks like:</p>
  
  <pre><code>[
    [NaN, NaN, 3.9, NaN, NaN],
    [3.2, NaN, NaN, 2.9, NaN],
    [NaN, NaN, 2.5, NaN, NaN],
    [7.6, NaN, NaN, NaN, 1.3],
    [NaN, 0.6, NaN, NaN, NaN]
  ]
  </code></pre>
  
  <p>I know that there exists <strong>scipy.interpolate.interp2d</strong> (<a href="https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.interp2d.html" rel="nofollow noreferrer">https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.interp2d.html</a>). But I want to do a Spline-Interpolation. With <strong>pandas</strong> (<a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.interpolate.html" rel="nofollow noreferrer">https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.interpolate.html</a>) I can do spline, but I am not sure if it and how it works for 2 dimensional Data. Maybe there is someone, who could help me! :-)</p>
  
  <p>Thanks</p>