Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9525

[Python] Array.__str__ shows misleading output for timestamp types with time zone set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++, Python

    Description

      The output is being shown with UTC interpretation

      In [13]: arr = pa.array([0, 1, 2], type=pa.timestamp('ns', 'America/Los_Angeles'))             
      
      In [14]: arr.view('int64')                                                                     
      Out[14]: 
      <pyarrow.lib.Int64Array object at 0x7fd1b8acdd70>
      [
        0,
        1,
        2
      ]
      
      In [15]: arr.type                                                                              
      Out[15]: TimestampType(timestamp[ns, tz=America/Los_Angeles])
      
      In [16]: arr                                                                                   
      Out[16]: 
      <pyarrow.lib.TimestampArray object at 0x7fd1b8ad5ec0>
      [
        1970-01-01 00:00:00.000000000,
        1970-01-01 00:00:00.000000001,
        1970-01-01 00:00:00.000000002
      ]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            wesm Wes McKinney
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: