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

[Python] Overflow in Date32 column conversion to pandas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.15.0
    • Python
    • None

    Description

      When converting an arrow column holding a Date32Array to pandas there seems to be an overflow at the date 2262-04-12 such that the type and value are wrong. The issue only occurs for columns, not for arrays.

      Running on debian 9.5 w/ python2 gives
       

      In [1]: import numpy as np
      
      In [2]: import datetime
      
      In [3]: import pyarrow as pa
      
      In [4]: pa.__version__
      Out[4]: '0.10.0'
      
      In [5]: arr = pa.array(np.array([datetime.date(2262, 4, 12)], dtype='datetime64[D]'))
      
      In [6]: arr.to_pandas(date_as_object=False)
      Out[6]: array(['2262-04-12'], dtype='datetime64[D]')
      
      In [7]: pa.column('name', arr).to_pandas(date_as_object=False)
      Out[7]:
      0 1677-09-21 00:25:26.290448384
      Name: name, dtype: datetime64[ns]
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fjetter Florian Jetter
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: