Categories
data science

Create a range of dates using Pandas – Python

Here is how to create a range of dates using the Pandas module. The range will start from April 2 2014 and will end October 1 2014. Well…here it is That’s pretty much it!

Categories
Uncategorized

Formatting Dates – Python

We have a date like this 3rd April 2013 and we want to change it to this 2013-04-03 We can change the date format using the datetime module. In this module we can use strptime( ) to tell Python that the string is a date, and then strftime( ) to change the date to the […]

Categories
Uncategorized

Reformatting dates – Python

This little script will reformat a series of dates in a file, from 22 April 1980 to a more compact 19800422 ([yyyymmdd]) ISO standard, using the re and time libraries. Start with a file containing a series of dates Then this is the python code Now the output file will read