https://onestopde.com/pyspark-transformations-with-implementation-for-rdd-and-dataframe/