1
Hello I have the following code that turns a "Brazilian" date into a standard date:
df2['Start_Date'] = df2['Start_Date'].apply(lambda x: datetime.strptime(x, '%d/%m/%Y'))
df2['End_Date'] = df2['End_Date'].apply(lambda x: datetime.strptime(x, '%d/%m/%Y'))
df2['Days_Considered'] = df2['End_Date'] - df2['Start_Date']
The result would be:
Days_conidered
x days
How can I turn this df column ('Days_considered') into an integer? Since it will appear for example: 9 days. I’ve tried using int(), but it goes wrong.
Thank you so much!!! It worked!
– Vivian