I have created a dataframe using below python code.
import pandas as pd
import datetime as dt
d = {'StartDate': pd.Series(["2018-11-01", "2018-11-04", "2018-11-06"]),
'EndDate': pd.Series(["2018-11-03", "2018-11-05", "2018-11-10"])}
df = pd.DataFrame(d)
df['StartDate'] = pd.to_datetime(df['StartDate'])
df['EndDate'] = pd.to_datetime(df['EndDate'])
I would like to have a column as Date, which will be having the dates between startdate and enddate columns values.
Expected Output:-
I did tried the same thing in R which i am familiar already.
R Script:-
df1 %>%
rowwise() %>%
do(data.frame(.[1:2], date = seq(.$min_date, .$max_date, by = "1 day")))
Can anyone please suggest me?