Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4051

Rows in python should support conversion to dictionary

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.2.0
    • SQL
    • None

    Description

      When working with the output of a query against a sqlContext, the result a Row object with fields accessible via dot notation rather than something similar to a dictionary.

      The issue is that there are libraries (such as pandas and ggplot) that do not know how to operate on Rows but you can supply field names for the libraries to use. When the library attempts to use the row, it expects a data type like a dictionary, indexable using brackets and named field i.e. obj["fieldname"].

      Attachments

        Issue Links

          Activity

            People

              davies Davies Liu
              chrisgrier Chris Grier
              Michael Armbrust Michael Armbrust
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: