You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/10 08:51:32 UTC

[GitHub] [arrow] AlenkaF commented on issue #13111: Convert string time to timestamp.

AlenkaF commented on issue #13111:
URL: https://github.com/apache/arrow/issues/13111#issuecomment-1122113450

   Unfortunately I wasn't able to reproduce locally:
   
   ```python
   >>> import pyarrow
   >>> import pandas as pd
   >>> pyarrow.__version__
   '8.0.0'
   >>> pd.__version__
   '1.4.2'
   
   >>> import pyarrow.compute as pc
   >>> _ts = ["9/03/2043 12:35 AM"]
   >>> _format = "%d/%m/%Y %I:%M %p"
   
   >>> pd.to_datetime(_ts, format=_format)
   DatetimeIndex(['2043-03-09 00:35:00'], dtype='datetime64[ns]', freq=None)
   >>> pc.strptime(_ts, format= _format, unit='s')
   <pyarrow.lib.TimestampArray object at 0x7fcae0078e80>
   [
     2043-03-09 00:35:00
   ]
   ```


-- 
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@arrow.apache.org

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