Allow transformation from DataFrame to GroupBy