TheNeuralBit commented on a change in pull request #12676:
URL: https://github.com/apache/beam/pull/12676#discussion_r475973354
##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -261,15 +261,21 @@ def __setitem__(self, key, value):
else:
raise NotImplementedError(key)
+ @frame_base.args_to_kwargs(pd.DataFrame)
+ @frame_base.populate_defaults(pd.DataFrame)
+ @frame_base.maybe_inplace
def set_index(self, keys, **kwargs):
if isinstance(keys, str):
keys = [keys]
if not set(keys).issubset(self._expr.proxy().columns):
raise NotImplementedError(keys)
- return self._elementwise(
- lambda df: df.set_index(keys, **kwargs),
- 'set_index',
- inplace=kwargs.get('inplace', False))
+ return frame_base.DeferredFrame.wrap(
+ expressions.ComputedExpression(
+ 'aggregate',
Review comment:
```suggestion
'set_index',
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]