Question: Python create a column called number_of_days that represents the number of days that will be subtracted from another column called date. date column contains dates
Python
create a column called number_of_days that represents the number of days that will be subtracted from another column called "date". date column contains dates such as 2020-12-13, 2020-10-25 .
the new column number_of_days should have the number of days between today's date subtracted from date.
number_of_days = today's date - date
For example: lets say the first row in the "date" column is 2020-12-13
so the firs row in the new column "number_of_days " should be:
number_of_days = 2021-03-04 - 2020-12-13 = 81 days
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
