How to Get Today’s Date or Any Past Date in Python

This is a pretty straightforward task that can be easy to forget if you don’t use them often enough. So let’s get started. This article will help you on how to get today’s date in Python and how to get any past or future day in Python, or in other words how to get date…

Step by Step Basic Git Commands

I first used git probably around 5 years ago, maybe sometime during the second or third year of my bachelor’s study. The problem is no matter how many times I use git, I still don’t understand it and end up forgetting many things. I admit, maybe I am not that smart. So anyway, I am…

Creating Time Range in Python: Date Range and Month Range

Oftentimes we run into a problem where we are required to generate a list or series of dates between two available dates. Pandas has provided us with some functionalities that made this possible using date_range() or period_range(). First, let’s define the two dates we have to generate the dates in between. Using date_range() We are…

Extracting Datetime Format in Python: Day, Date, Month, Year, etc.

Extracting data in datetime format can be very tricky and frustrating. I have summed up a few things about datetime in Python that I have learned in the code below. Let’s load the packages that we are going to need, such as pandas and datetime, then, define a variable to store a datetime data format….