[
https://issues.apache.org/jira/browse/ARROW-10061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200870#comment-17200870
]
Joris Van den Bossche commented on ARROW-10061:
-----------------------------------------------
It is answered on StackOverflow now, so closing here.
You will indeed need to do this conversion yourself, to ensure you have a
timestamp type in the arrow table. Doing it in pandas for now might be the
easiest workaround. With the {{pyarrow.compute}} module it can also be done in
pyarrow.
> How to convert a float to a Parquet TIMESTAMP Logical Type?
> -----------------------------------------------------------
>
> Key: ARROW-10061
> URL: https://issues.apache.org/jira/browse/ARROW-10061
> Project: Apache Arrow
> Issue Type: Task
> Reporter: Pierre
> Priority: Trivial
>
> Hi,
> I am sorry, this is a simple usage question, that I raised on
> [SO|https://stackoverflow.com/questions/63991411/how-to-convert-a-float-to-a-parquet-timestamp-logical-type],
> but got no answer.
> I came across the [Parquet Logical Types documentation
> page|https://github.com/apache/parquet-format/blob/master/LogicalTypes.md] on
> Github, and more specifically the chapter regarding
> [Timestamp|https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#timestamp].
> Please, how can we convert a column of timestamps stored as float64 to a
> column with timestamps stored as `TIMESTAMP` parquet logical type?
> For instance, starting with this code.
> {code:python}
> import pyarrow as pa
> my_table = pa.table({'timestamp': pa.array([1600419000.477,1600419001.027])})
> {code}
> Thanks for any help,
> Have a good day,
> Bests,
> Pierre
--
This message was sent by Atlassian Jira
(v8.3.4#803005)