menu_book Course Curriculum (Pandas) expand_more
Series & DataFrames
Selection & Filtering
Cleaning Data
Grouping & Aggregation
Joining & Reshaping
Time Series & I/O
category dtype
Learn category dtype in Pandas with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Intermediate
Advertisement
pandas-024.py
python
import pandas as pd
s=pd.Series(['low','high','medium','low'], dtype='category')
print(s.cat.categories.tolist(), s.dtype)
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content