[
https://issues.apache.org/jira/browse/BEAM-12529?focusedWorklogId=616545&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-616545
]
ASF GitHub Bot logged work on BEAM-12529:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jun/21 15:20
Start Date: 29/Jun/21 15:20
Worklog Time Spent: 10m
Work Description: 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 616545)
Time Spent: 1h 40m (was: 1.5h)
> to_pcollection does not support timestamp types
> -----------------------------------------------
>
> Key: BEAM-12529
> URL: https://issues.apache.org/jira/browse/BEAM-12529
> Project: Beam
> Issue Type: Improvement
> Components: dsl-dataframe
> Reporter: Brian Hulette
> Assignee: Brian Hulette
> Priority: P2
> Fix For: 2.32.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> We do not currently support converting timestamps directly from a deferred
> dataframe to a schema'd PCollection. It will raise an error like:
> {code}
> TypeError: Unsupported dtype in proxy: 'datetime64[ns]'
> {code}
> Note that pandas timestamps are nanosecond precision by default, while Beam's
> Timestamp type is microsecond precision.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)