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/29 15:20:20 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #15073: [BEAM-12529] Allow converting arbitrary pandas dtypes back to Python types by shunting typehint to Any

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



##########
File path: sdks/python/apache_beam/dataframe/schemas_test.py
##########
@@ -290,6 +290,29 @@ def test_unbatch_include_index_column_conflict_raises(self):
       with self.assertRaisesRegex(ValueError, 'foo'):
         _ = pc | schemas.UnbatchPandas(proxy, include_indexes=True)
 
+  def test_unbatch_datetime(self):
+
+    s = pd.Series(
+        pd.date_range(
+            '1/1/2000', periods=100, freq='m', tz='America/Los_Angeles'))
+    proxy = s[:0]
+
+    with TestPipeline() as p:
+      res = (
+          p | beam.Create([s[::2], s[1::2]])
+          | schemas.UnbatchPandas(proxy, include_indexes=True))
+
+      assert_that(
+          res,
+          equal_to(
+              list(

Review comment:
       Good point, done




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org