DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.
Now, we use head to sample per group. Because the dataset is already shuffled, this is equivalent to using sample as we did before.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Hello!
Pull Request overview
Details
Previously, this warning would trigger:
Now, we use
head
to sample per group. Because the dataset is already shuffled, this is equivalent to usingsample
as we did before.