pyspark.sql.Row.asDict — PySpark 3.1.1 documentation
spark.apache.org › api › pysparkpyspark.sql.Row.asDict¶ Row.asDict (recursive = False) [source] ¶ Return as a dict. Parameters recursive bool, optional. turns the nested Rows to dict (default: False). Notes. If a row contains duplicate field names, e.g., the rows of a join between two DataFrame that both have the fields of same names, one of the duplicate fields will be selected by asDict.