You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/06/08 19:32:15 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #14876: [BEAM-12074] Define docstrings for all DataFrame operations

TheNeuralBit commented on a change in pull request #14876:
URL: https://github.com/apache/beam/pull/14876#discussion_r647736573



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -2115,11 +2115,18 @@ def fill_matrix(*args):
               requires_partition_by=partitionings.Singleton(),
               proxy=proxy))
 
+  @frame_base.with_docs_from(pd.DataFrame)
   @frame_base.args_to_kwargs(pd.DataFrame)
   @frame_base.populate_defaults(pd.DataFrame)
   def corrwith(self, other, axis, drop, method):
-    if axis not in (0, 'index'):
-      raise NotImplementedError('corrwith(axis=%r)' % axis)
+    if axis in (1, 'columns'):

Review comment:
       Usually what happens for bad arguments like this is that an error gets raised when we generate the proxy object, which is nice because it's an actual pandas error.
   
   I went to verify that in this particular case, and we weren't actually raising an error because the `axis` argument wasn't passed through for proxy generation. I fixed this (and added a test) in 2a31d7c. So thank you for asking!




-- 
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:
users@infra.apache.org