Q. Which pandas method converts a Series with categorical values to category dtype?
β
Correct Answer: (A)
astype('category')
Explanation: astype('category') converts a Series to a categorical data type, which is memory efficient.