AI engineering glossary · NumPy pandas visualization
What is dt accessor?
dt accessor (also called .dt): The .dt namespace on a pandas datetime column that extracts parts such as year, month or weekday, and supports date arithmetic and formatting for every value at once. It is used to create calendar features for analysis and models.
dt accessor: an example
df['order_date'].dt.month returns the month number of each order.
Related terms
More NumPy pandas visualization terms
Where you learn it
dt accessor is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.