Skip to content

Instantly share code, notes, and snippets.

@NeerajBhadani
Created May 25, 2020 14:58
Show Gist options
  • Save NeerajBhadani/2da92ce9929be7841a1d71e2ded6bc65 to your computer and use it in GitHub Desktop.
Save NeerajBhadani/2da92ce9929be7841a1d71e2ded6bc65 to your computer and use it in GitHub Desktop.
Create DataFrame
case class Salary(depName: String, empNo: Long, salary: Long)
val empsalary = Seq(
Salary("sales", 1, 5000),
Salary("personnel", 2, 3900),
Salary("sales", 3, 4800),
Salary("sales", 4, 4800),
Salary("personnel", 5, 3500),
Salary("develop", 7, 4200),
Salary("develop", 8, 6000),
Salary("develop", 9, 4500),
Salary("develop", 10, 5200),
Salary("develop", 11, 5200)).toDF()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment