PySpark Strings
9 interview problems on clean and transform text columns, from easy to hard.
Learn Strings
- String functions · 5 min read. concat vs concat_ws, substring, split, trim and padding, with the null traps in each.
- Regular expressions from zero · 8 min read. What a regex is, the dozen symbols behind almost every pattern, and how to read and build one piece by piece.
- regexp_extract · 8 min read. Extract, filter, replace and collect with a regular expression, and what you get when nothing matches.
- select · 6 min read. Choose, rename and compute columns, and why select beats a chain of withColumn calls.
- Mask Personal Data Before Training · Easy · Data Prep for AI, Strings, Filtering & Selection
- Parse Application Log Lines · Medium · Strings, Filtering & Selection
- Parse UTM Parameters · Medium · Strings, Conditional Logic, Filtering & Selection
- Word Count · Medium · Arrays, Aggregations, Strings, Filtering & Selection
- Learning Path per Student · Medium · Arrays, Aggregations, Strings, Filtering & Selection
- Inventory a Partitioned Folder · Medium · Data Lake, Aggregations, Strings
- Remove Near-Duplicate Documents · Medium · Data Prep for AI, Window Functions, Strings
- Filter Low-Quality Training Text · Medium · Data Prep for AI, Strings, Null Handling
- What Changed Between Two Versions · Hard · Lakehouse, Joins, Strings
Browse
Topics: Window Functions · Joins · Aggregations · Pivot, Unpivot & Rollup · Arrays · Null Handling · Conditional Logic · Dates · Filtering & Selection · Strings · Data Lake · Lakehouse · Streaming · Data Prep for AI · Spark Performance
Difficulty: Easy · Medium · Hard · Learn · All problems · dbt practice