Answers for "A distributed collection of data grouped into named columns"

0

A distributed collection of data grouped into named columns

# A distributed collection of data grouped into named columns

people = sqlContext.read.parquet("...")

ageCol = people.age

# To create DataFrame using SQLContext
people = sqlContext.read.parquet("...")
department = sqlContext.read.parquet("...")

people.filter(people.age > 30).join(
  department, people.deptId == department.id).groupBy(
  department.name, "gender").agg({"salary": "avg", "age": "max"})
Posted by: Guest on April-19-2020

Code answers related to "A distributed collection of data grouped into named columns"

Python Answers by Framework

Browse Popular Code Answers by Language