yeandy commented on a change in pull request #17026:
URL: https://github.com/apache/beam/pull/17026#discussion_r837531323



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -957,6 +957,69 @@ def truncate(df):
             requires_partition_by=partitionings.Arbitrary(),
             preserves_partition_by=partitionings.Arbitrary()))
 
+  @frame_base.with_docs_from(pd.DataFrame)
+  @frame_base.args_to_kwargs(pd.DataFrame)
+  @frame_base.populate_defaults(pd.DataFrame)
+  def unstack(self, **kwargs):
+    level = kwargs.get('level', -1)
+
+    if self._expr.proxy().index.nlevels == 1:
+      if PD_VERSION < (1, 2):
+        raise frame_base.WontImplementError(
+          "pandas==1.1.5 has an indexing error bug," \
+          " causing an error with unstack()")

Review comment:
       Changed!




-- 
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