Why is the StringIndexer used in machine learning?
Real Exam
Explanation:
The StringIndexer is crucial for converting textual data into numerical format, ensuring the categorical context is preserved. This conversion is essential for machine learning algorithms that operate on numerical inputs.