如果我有以下 pandas 系列:import pandas as pd s = pd.Series([0,1,1,0,1,0,0,1,1,0,1,1,1])我想要一個連續數量的計數列表,即在這種情況下所需的輸出是[2,1,2,3]我怎樣才能得到上面的輸出呢? 查看完整描述