I have a data frame that looks like this:
import pandas as pd
d = {'TransactionId' : pd.Series([633025, 634560],index = ['2018-01-07 22:30:00', '2018-01-08 19:00:00']),
'Value' : pd.Series([677.06, 677.44], index = ['2018-01-07 22:30:00', '2018-01-08 19:00:00'])}
df = pd.DataFrame(d)
df.head()
Once TransactionId 633025 finishes, values cease recording until the next Transaction begins. I would like to add in a datetime index value every 15 minutes between the two occurrences, with TransactionId of 'NaN', and forward filling the the Value column. I have tried using .resample and .asfreq without any luck; using either with a period of '15min' doesn't modify the dataframe accordingly. How can I do this?