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

[Python] Accept pd.NA as missing value in array constructor

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • Python

    Description

      Currently we don't support using pandas.NA at all:

      In [1]: import pyarrow as pa
      
      In [2]: import pandas as pd
      
      In [3]: pa.array([pd.NA, "A"])
      ---------------------------------------------------------------------------
      ArrowInvalid                              Traceback (most recent call last)
      <ipython-input-3-77e774fa8521> in <module>
      ----> 1 pa.array([pd.NA, "A"])
      
      ~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
      
      ~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
      
      ~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
      
      ArrowInvalid: Could not convert <NA> with type NAType: did not recognize Python value type when inferring an Arrow data type
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              uwe Uwe Korn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h