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



##########
File path: sdks/python/apache_beam/dataframe/pandas_top_level_functions.py
##########
@@ -38,8 +38,14 @@ def wrapper(target, *args, **kwargs):
 
 
 def _defer_to_pandas(name):
+  func = getattr(pd, name)
+
   def wrapper(*args, **kwargs):
-    res = getattr(pd, name)(*args, **kwargs)
+    if any(isinstance(arg, frame_base.DeferredBase)
+           for arg in args + tuple(kwargs.values())):
+      return frame_base._elementwise_function(func, name)(*args, **kwargs)

Review comment:
       Although on second thought maybe we shouldn't support to_numeric since 
its proxy is data-dependent..




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


Reply via email to