Spark's frequently used code notes

Since Spark is a Python program, it can be written quite freely. However, since I always have a general idea of what I need to do, and knowing various ways of writing Spark makes it harder to remember, I will summarize my personal frequently used Spark code in the form of one-purpose-one-code. Basiā€¦