Relative Content

Tag Archive for pythonpandasdataframegroup-by

Pandas every nth row from each group

Assume groups will have more than n memebers, I want to take every nth row from each group. I looked at https://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.core.groupby.GroupBy.nth.html but that only takes one row from each group.