-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
Describe the enhancement requested
PrettyPrint for Timestamp is currently printing values in UTC even when the timezone is defined. This can get confusing and there is a PR open with a simple fix of adding "Z" to the end of the string in case timezone is defined:
#39272
This way we can at least see which tz is the data printed in.
It would also be good to add timezone information when printing the array, for example:
# Adding timezone information in new line
>>> pa.array([0], pa.timestamp('s', tz='+02:00'))
<pyarrow.lib.TimestampArray object at 0x125319de0>
<timestamp[s, tz=+02:00]>
[
1970-01-01 00:00:00Z
]
# Or at the end of first line (not very clear in my opinion)
>>> pa.array([0], pa.timestamp('s'))
<pyarrow.lib.TimestampArray object at 0x125319e40><timestamp[s]>
[
1970-01-01 00:00:00
]In Python this can be done by adding a separate __repr__ to TimestampArray class.
Would something similar also be needed for R or is timezone information available when printing an Array? cc @paleolimbot
Component(s)
Python, R
ianmcook