How to groupby consecutive values in pandas DataFrame
I have a column in a DataFrame with values:
I have a column in a DataFrame with values:
I have a pandas dataframe defined as:
If I have a pandas.core.series.Series named ts of either 1’s or NaN’s like this: