transpose datetime with label
I wish to transpose this datetime into a column with a label (name) associated with the times in range. Then ultimately add them to a sqlite table
I have searched and tried some of the suggestions here but I could nnot get what I'm looking for
2019-10-2 Bob 2019-10-3 Bob 2019-10-4 Bob
from datetime import date,datetime
import pandas as pd
import sqlite3
import numpy as np
conn = sqlite3.connect('data.db')
name = 'Bob'
startDate = pd.to_datetime(str('10/02/2019'))
endDate = pd.to_datetime(str('10/09/2019'))
d=pd.date_range(start=startDate, end=endDate)
for i in d:
df=pd.DataFrame({'Date':[i], 'Name':[name]})
df.transpose()
print(df)
I get only one date in a column with one name, not the range of dates between the startDate and endDate.