Using a DataFrame, you can split SQL into several statements / queries, which helps in debugging, simple improvements, and code maintenance.
Overcoming complex SQL queries into simpler queries and assigning the result in DF gives you a better understanding.
By parsing the request into several DFs, the developer gets the advantage of using the cache and repair (for even distribution of data across partitions using a unique key / key that is close to unique).
Ram
source share