You can just group by the yearweek column and then calculate the minimum and maximum dates for each group.
result = df.groupBy("yearweek").agg( min("date").alias("first_day_of_week"), max("date").alias("last_day_of_week") )