Skip to content

Instantly share code, notes, and snippets.

Created June 17, 2019 07:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import pandas as pd
import datetime as dt
booksv2 = pd.read_csv('book1.csv')
booksv2['Start'] = booksv2['Start'].apply(lambda x: dt.datetime.strptime(str(x),'%d/%m/%Y'))
booksv2['End'] = booksv2['End'].apply(lambda x: dt.datetime.strptime(str(x),'%d/%m/%Y'))
min_date = min(list(booksv2['Start'])+list(booksv2['End']))
max_date = max(list(booksv2['Start'])+list(booksv2['End']))
#year = min_date.year
year = 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment