
However, if developers develop in pure Python on Databricks, they barely take advantage of features (especially parallel processing for big data) from Spark. For example, while developing ML models, developers may depend on certain libraries available in Python which are not supported by Spark natively (like basic Scikit learn library, which cannot be applied on Spark DataFrame). However, Python has become the default language for data scientists to build ML models, where a huge number of toolkits and libraries can be very useful. When Spark engineers develop in Databricks, they use Spark DataFrame API to process or transform big data which are native Spark functions.

The idea of Pandas UDF is to narrow the gap between processing big data using Spark and developing in Python. Pandas UDF was introduced in Spark 2.3 and continues to be a useful technique for optimizing Spark jobs in Databricks.
