Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFrame API example without SQL #4

Open
goldshtn opened this issue May 5, 2016 · 0 comments
Open

DataFrame API example without SQL #4

goldshtn opened this issue May 5, 2016 · 0 comments
Assignees

Comments

@goldshtn
Copy link
Owner

goldshtn commented May 5, 2016

The SparkSQL examples can be adjusted to also cover the DataFrame API without writing SQL statements. The same applies to UDF. For example:

compensation = udf(lambda delay: 0 if delay < 15 else delay * 10)
df.select(..., compensation(df['ArrDelay'])).groupBy("carrier")...
@goldshtn goldshtn self-assigned this May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant