Assign a unique value to consecutive null values untill a non value
Assign a unique value to consecutive null values untill a non value Question: I want to apply a function that does the cumulative count of null values. The closest solution I came to was this: import pandas as pd import numpy as np # create the column col = pd.Series([1, 2, np.nan, np.nan, 3, 4, …