Create a Spark program in Python that generates a new dataframe from an existing dataframe by removing duplicates
Not applicable
from pyspark.sql import functions as F

def removeDuplicates(df):
 df = df.dropDuplicates()
 df = df.orderBy(F.desc("date"))
 return df