Let us assume we have a Dataframe with randomly placed NaNs (sometimes even only-NaN rows). Are there already established ways/methods to interpolate with influence of both, rows and columns at the same time? (vectorized)
import pandas as pd, numpy as np
df = pd.DataFrame(np.random.randn(100000, 4),
columns=['one', 'two', 'three', 'four'])
df = df.mask(np.random.random(df.shape) < .1)
print(df)
>> one two three four
0 0.328574 0.460837 -1.242114 0.871454
1 -1.155524 0.911798 0.733518 1.355840
2 -0.482975 NaN -0.688304 0.015186
3 -0.714028 -2.133300 NaN 1.074630
4 -0.789536 -0.330372 1.158331 -0.571878
... ... ... ...
99995 -0.030537 0.160436 -2.085611 NaN
99996 -0.690557 NaN -2.499389 0.044560
99997 0.150332 -1.188956 NaN -1.645208
99998 1.124226 0.443667 1.543553 0.469025
99999 -2.084317 -0.056264 -0.389893 -0.743672
[100000 rows x 4 columns]