Backport PR #42640 on branch 1.3.x (BUG: Fix bug in SeriesGroupBy.value_counts when DataFrame has one row (#42618))
Backport PR #42640: BUG: Fix bug in SeriesGroupBy.value_counts when DataFrame has one row (#42618)