Spark dataframe apply function to each row python. Spark runs on both Windows and UNIX-like systems (e.