Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue!

  • Saniya Khullar
  • 2022-01-12
  • 282
Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue!
working with dates in pythonpandaspythondatetime pythonworking with dates in pandasnot able to work with dates in pythonpandas dates columnfix date column in pandas dataframehow to work with dates in pythonsubset pandas dataframe based on datessubset python df based on datessubsetting based on datesfilter based on dates
  • ok logo

Скачать Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue! бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue! или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue! бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Stuck on Dates in Python Pandas Dataframes? Datetime Package to the Rescue!

Please note that in this video, Saniya talks about how you can use the datetime package in Python to work with date columns in a dataframe, especially when those are in an unusual format. How do you convert your date column into a column of a proper date format for subsetting. Otherwise, if ye try to subset the original columns of the dataframe on a date (for example: please filter the dataframe for only dates after April 17, 1995), then ye may not get the right results. After watching this video, ye will hopefully learn about how datetime can help ye convert your original date column to a format so that when ye do this subsetting/filtering, ye truly get the right dates. Moreover, Saniya talks about plotting a line chart showing date values over time (values of dates), and goes through the plotly express line chart (please see Saniya's video for more details on plotly express for plotting:    • Python Data Visualization Guide for Plotly...   and data visualization)

In this video, Saniya shows another dataset available on Kaggle.com: https://www.kaggle.com/axeltorbenson/... (U.S. Unemployment Data from 1948 to 2021). Thus, dates are a key part of this dataframe and filtering based on dates is very important. The dates are originally given in a format of Month/Day/Year: 2/1/1948 is February 1st, 1948, which is how dates are represented in the U.S. In other regions of the world, such as the United Kingdom, India, etc. dates are represented as Day/Month/Year, so 1/2/1948 instead is February 1st, 1948.

Ultimately, Saniya converts the list of dates from month/day/year string format to a year-month-day date format that Python's pandas package can recognize for subsetting and filtering dates on.

These are important skills for data pre-processing and for fixing our dataframes in Pandas so that we can do future analysis. Moreover, learning about the Datetime package can be helpful especially in other applications (outside of dataframes).

Also, please don't forget to subscribe to Saniya's YouTube channel! :)

TIME STAMPS:
00:00 Struggling with Dates in Python Pandas Dataframes? Datetime Package to the Rescue!
02:16 Dataset used: Unemployment data from Kaggle
03:38 Loading in the dataframe (on unemployment data) in Python via pandas
04:28 Subsetting and Filtering Pandas Dataframe (based on values in 1 non-date column)
06:16 Plotting the time series data (Line Plot using Plotly Express)
08:04 The question we ask: how to filter/subset a dataframe based on dates
08:56 Trying to filter/subset dates the wrong way ... fails :(
12:07 Filtering on Dates is different (than for other column) and we need to use datetime package
13:18 Introduction to Datetime package
16:16 Explaining datetime.datetime.strptime output (Month/Day/Year input in U.S.A.)
18:23 Working with datetime for Day/Month/Year dates (e.g. in UK, India, etc.)
19:51 Getting a list of values for a column (e.g. dates) from pandas dataframe
20:12 Applying datetime operations for a list of dates (for-loop) and storing in updatedDateList list
25:57 problem: results for updatedDateList are objects and are not in year-month-day date format :(
27:30 answer: we need to convert the items in updatedDateList to string
27:55 solution 1: using list comprehension to correct updatedDateList
28:59 solution 2: modify the for-loop for updatedDateList to include str() before adding to list
30:00 adding updatedDateList as a column to dataframe
31:20 testing if subsetting/filtering on dates for the new date column works...it does :)
33:06 Helpful reminders about working with dates
35:30 New Years Fun (dates are happy things toooooo...)
Python programming playlist:    • Python Programming  

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]