Created
June 17, 2019 07:46
-
-
Save ken333135/1235004f58e7af296293569d2fda25da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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