我在DataFrame中有一个包含值的列:
[1, 1, -1, 1, -1, -1]
我该如何将它们分组呢?
[1,1] [-1] [1] [-1, -1]
python group-by dataframe pandas cumsum
cumsum ×1
dataframe ×1
group-by ×1
pandas ×1
python ×1