Convert Strings to Dates in Pandas with to_datetime and .dt | Pandas Course #35
On which day of the week does Netflix add new titles? The answer is sitting in a date column, but right now pandas sees it as plain text. Today you'll turn text into real dates, and by the end you'll answer that question with a chart. In this 24-minute lesson you'll learn to: ✅ Explain why dates stored as text give wrong answers ✅ Convert text to datetime with pd.to_datetime and format codes ✅ Clean messy date strings and handle values that won't parse ✅ Pull out years, months, weekdays and hours with .dt ✅ Measure durations and filter by date 📊 Data: the Netflix catalogue and a month of New York taxi trips 🛠️ Mini-project: when does Netflix add titles? This is Lesson 35 of 65 in the free Pandas Full Course: from your first DataFrame to real business and machine-learning projects. Pandas is the tool data analysts use every day, and every lesson uses real data, so you finish with skills you can show an employer. 📓 Free notebooks, datasets and 500+ lessons (no sign-up): https://www.mathewkanalytics.com/?utm_source=youtube&utm_medium=description ⏱️ Chapters 0:00 Introduction 1:01 Warm-up: dates are labels too 1:49 Why text dates are not enough 3:41 Convert strings with pd.todatetime 6:54 Format codes and values that won't parse 10:59 Extract components with .dt 14:44 Times of day and durations 17:21 Filter and compare with dates 19:40 Mini-project: when does Netflix add titles? 22:36 Recap 23:14 Challenges 23:36 What's next ⏮️ Previous: Index Alignment: https://www.youtube.com/watch?v=CktOgRAIK7A ▶️ Next: DatetimeIndex: https://www.youtube.com/watch?v=dWb8lmnzb_0 📚 Full Pandas course playlist: https://www.youtube.com/playlist?list=PLcjVCNrv7tsA 💬 Stuck on a step? Ask in the comments and I'll help. #Pandas #Python #DataAnalysis
Название:
Convert Strings to Dates in Pandas with to_datetime and .dt | Pandas Course #35
Категория:
Разное