I have a series 's' with null and not null values:
s = pd.Series([np.nan, 5, 4, 2, np.nan, np.nan, 4, 3, np.nan])
I need to obtain 's1' returned last not null value before each np.nan:
s1 = [np.nan, np.nan, np.nan, 2, np.nan, np.nan, np.nan, 3, np.nan]
Many thanks in advance.
Regards Tom