티스토리 뷰

공부

[Java][Spark] pyspark.sql.Row.asDict

승가비 2021. 9. 11. 08:41
728x90
Row(name="Alice", age=11).asDict() == {'name': 'Alice', 'age': 11}

https://spark.apache.org/docs/3.1.1/api/python/reference/api/pyspark.sql.Row.asDict.html

 

pyspark.sql.Row.asDict — PySpark 3.1.1 documentation

Return as a dict Parameters recursivebool, optionalturns 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 f

spark.apache.org

 

728x90

'공부' 카테고리의 다른 글

[Linux] check DNS  (0) 2021.09.11
[Java][Spark] add column & default  (0) 2021.09.11
[Java][Spark] rename column - df = df.withColumnRenamed("colName", "newColName")  (0) 2021.09.11
[Java][Spark] new Row(**dict)  (0) 2021.09.11
[Java] lombok @Data  (0) 2021.09.06
댓글