I want to fill an empty dataframe using a list.
Here is the empty dataframe.
old_dates= pd.date_range((today -dt.timedelta(days=2)), (today-dt.timedelta(days=1))).strftime("%d %b")
columns=old_dates
df_verif=pd.DataFrame(columns=columns)
df_verif
24 Jun 25 Jun
All of the column names are dates (and will be longer through time). I then want to fill only the first row with one value for each day. Let's say I have a list that contains two values. How would I then add those values, in the order that they appear in the list, under the corresponding date?
test=[2.5,2.5]
Expected output:
0 24 Jun 25 Jun
1 2.5 2.5