caneff opened a new pull request, #28566:
URL: https://github.com/apache/beam/pull/28566

   In Pandas 2, groupby().apply() will append group keys to an index that 
already has them in cases where the apply is really a transform (the resulting 
index is same as the incoming one). This is a change from Pandas 1.5.  
   
   When running the original test with Pandas 1.5, we get the following warning:
   
   ```FutureWarning: Not prepending group keys to the result index of 
transform-like apply. In the future, the group keys will be included in the 
index, regardless of whether the applied function returns a like-indexed object.
   To preserve the previous behavior, use
   
        >>> .groupby(..., group_keys=False)
   
   To adopt the future behavior and silence this warning, use 
   
        >>> .groupby(..., group_keys=True)
     df.groupby(['provider']).apply(lambda x: x)
   ```
   
   So I set group_keys to False to retain the 1.5 behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to