Data-Science-Regular-Bootcamp
Data-Science-Regular-Bootcamp copied to clipboard
PySpark When Otherwise | SQL Case When Usage
PySpark When Otherwise and SQL Case When on DataFrame with Examples – Similar to SQL and programming languages, PySpark supports a way to check multiple conditions in sequence and returns a value when the first condition met by using SQL like case when and when().otherwise() expressions, these works similar to “Switch" and "if then else" statements.