Created
November 3, 2019 13:48
-
-
Save lakshay-arora/b56ba7eadaabc5d304a23702f488b23a 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
# import sql function pyspark | |
import pyspark.sql.functions as f | |
# null values in each column | |
data_agg = my_data.agg(*[f.count(f.when(f.isnull(c), c)).alias(c) for c in my_data.columns]) | |
data_agg.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment