nikfio opened a new issue, #41132: URL: https://github.com/apache/arrow/issues/41132
### Describe the bug, including details regarding any error messages, version, and platform. Hi guys, I am trying to convert a timestamp column from string to timestamp datatype. I have this format: `%Y%m%d %H%M%S%f` To read, for example, a date equal to `20090101 185956000`. Assuming that ` table['timestamp'][0] = '20090101 185956000' ` Running the script below ` import pyarrow.compute as pc ` ` pc.strptime(table['timestamp'][0], format='%Y%m%d %H%M%S%f', unit='ms') ` throws the error: ` *** pyarrow.lib.ArrowInvalid: Failed to parse string: '20090101 185956000' as a scalar of type timestamp[ms] ` Meanwhile if I use strptime from datetime module: ` test_date = str(table['timestamp'][0]) ` ` datetime.strptime(str(df['timestamp'][0]), '%Y%m%d %H%M%S%f') ` It gives as output a correctly read datetime object: ` datetime.datetime(2009, 1, 1, 18, 59, 56) ` Should the pyarrow strptime work like the standard datetime strptime function? What am I doing wrong? Many thanks, Nick ### Component(s) Python -- 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]
