Carst - groupby cython implementation