Create Histogram Python When Function In Pyspark