Practice a classic MapReduce-style word count in PySpark. Given lines of text, count how many times each word appears (case-insensitive, ignore punctuation).
Examples
Input
lines = ["hello world", "hello spark"]
Output
[("hello", 2), ("world", 1), ("spark", 1)]Constraints
- Use DataFrame or RDD APIs
- Normalize words to lowercase