Stephen Allwright

I'm a Data Scientist currently working for Oda, an online grocery retailer, in Oslo, Norway. These posts are my way of sharing some of the tips and tricks I've picked up along the way.

Extract year from DateTime in Pandas

Extract year from DateTime in Pandas Members Public

Being able to extract the year from a DateTime object in Pandas can be extremely helpful for feature engineering. In this post, I will walk through how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
Get year from DateTime Python

Get year from DateTime in Python Members Public

Being able to extract the year from a DateTime object in Python can be extremely helpful for feature engineering. In this post, I will walk through how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
Pandas convert DateTime to date in Python

Pandas convert DateTime to date Members Public

Being able to convert a datetime64 object in Pandas to just the date can make it easier to understand and work with. In this post, I will show you how to do this simply in multiple variants.

Stephen Allwright
Stephen Allwright
Pandas
Python round DateTime to nearest 15 minutes or quarter hour

Python round time to nearest 15 minutes Members Public

Being able to round a DateTime object in Python to the nearest quarter hour can be extremely helpful for feature engineering. In this post, I will explain how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
pandas round datetime column to start or end of month

Pandas round datetime to month (simply explained) Members Public

Being able to round a DateTime object in Python to either the start or end of the month can be extremely helpful for feature engineering. In this post, I will example how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
python get month number from datetime object

Python get month from date (simply explained) Members Public

Being able to get the month number, or year month number, from a DateTime object in Python can be extremely helpful for feature engineering. In this post, I will walk through how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
python get week number and year week from datetime

Python get week number from datetime Members Public

Being able to get the week number, or year week number, from a DateTime object in Python can be extremely helpful for feature engineering. In this post, I will walk through how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas
Python Pandas round date to week

Pandas round DateTime to week Members Public

Being able to round a DateTime object in Python to a given weekday can be extremely helpful for feature engineering. In this post, I will example how to do this simply in multiple variations.

Stephen Allwright
Stephen Allwright
Pandas