Pandas Time Series Analysis Part 2: date_range

Опубликовано: 06 October 2026
на канале: codebasics
107,802
1.4k

Time series analysis is crucial in financial data analysis space. Pandas has in built support of time series functionality that makes analyzing time series extremely efficient. In this tutorial, we will see how date_range function allows to generate datetimeindex with specific start and end dates. It can also generate periods with different frequencies such as hourly,daily,monthly, weekly etc. We will then cover how asfreq function can be used to resample dataframe to a different frequency.

Topics that are covered in this Python Pandas Video:
0:00 Introduction
0:15 Download apple stock prices
2:09 Call date_range() function with arguments
3:24 Use set_index() function of dataframe
4:12 Plot a chart using matplotlib inline
4:56 How to get partial dataframe
5:36 Use asfreq() function
8:03 List of frequencies in date_range() function
10:36 Use randint() function

Code used in this tutorial:
https://github.com/codebasics/py/tree...

Do you want to learn technology from me? Checkhttps://resources.codebasics.io/SR5TiM for my affordable video courses.

To download csv and code for all tutorials: go to https://github.com/codebasics/py, click on a green button to clone or download the entire repository and then go to relevant folder to get access to that specific file.

Next Video:
Pandas Time Series Analysis 3: Holidays:    • Pandas Time Series Analysis 3: Holidays  

Popular Playlist:
Complete python course:    • Python 3 Programming Tutorials for Beginners  

Data science course:    • Data Science Full Course For Beginners | P...  

Machine learning tutorials:    • Machine Learning Tutorial Python | Machine...  

Pandas tutorials:    • Pandas Tutorial (Data Analysis In Python)  

Git github tutorials:    • Git/Github Tutorial  

Matplotlib course:    • Matplotlib tutorial  

Data structures course:    • Data Structures And Algorithms In Python  

Website: https://resources.codebasics.io/SR5TiM
Facebook:   / codebasicshub  
Twitter:   / codebasicshub