Created
November 20, 2017 15:52
-
-
Save icexelloss/26c3d8bacc41c77467f6ab23e91de65e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sample = df.filter(id == 1).toPandas() | |
# Run as a standalone function on a pandas.DataFrame and verify result | |
subtract_mean.func(sample) | |
# Now run with Spark | |
df.groupby('id').apply(substract_mean) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment