I have the following pandas.DataFrame
match_id court
0 50311513 1
1 50313011 2
2 50313009 2
3 50317691 1
4 50315247 2
5 50318597 1
6 50318877 1
7 50318983 1
8 50318831 1
9 50318595 1
As you can see there are a total of 2
courses. I want to bundle each “slot” together.
So, the first grouped df should contain match 50311513
and 50313011
. The second slot should contain 50313009
and 50317691
. After the third slot, the grouped df is basically a single row.
How can I tell pandas.groupby()
that only one match can be played on the course?
Thanks