In Python, which library is commonly used for natural language processing (NLP) tasks such as text classification and sentiment analysis?

Pandas
Seaborn
Statsmodels
spaCy

The correct answer is D. spaCy.

spaCy is a free, open-source natural language processing library for Python. It is fast, easy to use, and well-documented. spaCy supports a wide range of NLP tasks, including tokenization, part-of-speech tagging, named entity recognition, and sentiment analysis.

Pandas is a Python library for data analysis. It is used to read, clean, and manipulate data. Pandas is not specifically designed for NLP tasks, but it can be used for some NLP tasks, such as text classification.

Seaborn is a Python library for statistical visualization. It is used to create beautiful and informative visualizations of data. Seaborn is not specifically designed for NLP tasks, but it can be used for some NLP tasks, such as sentiment analysis.

Statsmodels is a Python library for statistical modeling. It is used to fit statistical models to data. Statsmodels is not specifically designed for NLP tasks, but it can be used for some NLP tasks, such as text classification.

In conclusion, spaCy is the best library for natural language processing tasks in Python. It is fast, easy to use, and well-documented. spaCy supports a wide range of NLP tasks, including tokenization, part-of-speech tagging, named entity recognition, and sentiment analysis.