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

[Python] Handle nested "set" values as lists when converting to Arrow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.0.0
    • Python

    Description

      See current behavior

      In [1]: pa.array([{1,2, 3}])                                                                   
      ---------------------------------------------------------------------------
      ArrowInvalid                              Traceback (most recent call last)
      <ipython-input-1-20fea2f9457a> in <module>
      ----> 1 pa.array([{1,2, 3}])
      
      ~/code/arrow/python/pyarrow/array.pxi in pyarrow.lib.array()
      
      ~/code/arrow/python/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
      
      ~/code/arrow/python/pyarrow/error.pxi in pyarrow.lib.check_status()
      
      ArrowInvalid: Could not convert {1, 2, 3} with type set: did not recognize Python value type when inferring an Arrow data type
      In ../src/arrow/python/iterators.h, line 70, code: func(value, static_cast<int64_t>(i), &keep_going)
      In ../src/arrow/python/inference.cc, line 621, code: inferrer.VisitSequence(obj, mask)
      In ../src/arrow/python/python_to_arrow.cc, line 1074, code: InferArrowType(seq, mask, options.from_pandas, &real_type)
      

      Attachments

        Issue Links

          Activity

            People

              amol- Alessandro Molina
              wesm Wes McKinney
              Votes:
              1 Vote for this issue
              Watchers:
              3 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 - 4h 20m
                  4h 20m