Brian Hulette created BEAM-12444:
------------------------------------
Summary: GroupBy.apply on a series grouped by a callable fails
Key: BEAM-12444
URL: https://issues.apache.org/jira/browse/BEAM-12444
Project: Beam
Issue Type: Bug
Components: sdk-py-core
Affects Versions: 2.29.0, 2.30.0
Reporter: Brian Hulette
Assignee: Brian Hulette
{code}
df.foo.groupby(lambda x: x % 3).apply(...)
{code}
This example fails because it tries to call set_index on a Series. It fails at
construction time, not at execution time.
To workaround users can call groupby on a single column dataframe instead, e.g.
{{df[['foo']].groupby...}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)