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

[C++][Python] Support constructing StructArray from list of key-value pairs

    XMLWordPrintableJSON

Details

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

    Description

      item = [
          ('a', 1),
          ('b', 2)
      ]
      ty = pa.struct([
          pa.field('a', type=pa.int8()),
          pa.field('b', type=pa.float64())
      ])
      pa.array([item], type=ty)
      

      raises

      ArrowTypeError: Could not convert [('a', 1), ('b', 2)] with type list: was not a dict, tuple, or recognized null value for conversion to struct type
      

      This feature is required for pa.repeat(scalar, n) roundtrip if the type contains duplicated field names.

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              kszucs Krisztian Szucs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: