Explode dates and backfill rows in pyspark dataframe
Explode dates and backfill rows in pyspark dataframe Question: I have this dataframe: +—+———-+——+ | id| date|amount| +—+———-+——+ |123|2022-11-11|100.00| |123|2022-11-12|100.00| |123|2022-11-13|100.00| |123|2022-11-14|200.00| |456|2022-11-14|300.00| |456|2022-11-15|300.00| |456|2022-11-16|300.00| |789|2022-11-11|400.00| |789|2022-11-12|500.00| +—+———-+——+ I need to create new records for each date until current_date() – 2. And the value that will be populated must be the most recent one. For …