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 2020/10/28 19:37:18 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #13139: [BEAM-9547] Implementation for drop, explode

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



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -1513,6 +1584,8 @@ def repeat(self, repeats):
               'repeat',
               lambda series: series.str.repeat(repeats),
               [self._expr],
+              # Output will also be a str Series

Review comment:
       Yeah when I added the verification of the proxy in `TransformTest` I found that this proxy was incorrectly inferred as `bool` for the zipping case tested there.
   
   ```py
   In [10]: proxy.dtypes
   Out[10]: 
   str        object
   repeats     int64
   dtype: object
   
   In [11]: proxy.str.str.repeat(proxy.repeats)
   Out[11]: Series([], Name: str, dtype: bool)
   ```
   
   The actual operation does produce `object` though:
   ```py
   In [13]: df.str.str.repeat(df.repeats)
   Out[13]: 
   0      AAA
   1        B
   2     CCCC
   3    DDDDD
   4       EE
   Name: str, dtype: object
   ```
   




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