Assume that I have the following dataframe in Pandas:
index = pd.date_range(start=pd.Timestamp('2017-07-01'), end=pd.Timestamp('2017-07-01') + pd.Timedelta('10D'))
df = pd.DataFrame(data=np.random.rand(11), index=index , columns=['rand'])
df.head()
rand
2017-07-01 0.794164
2017-07-02 0.948194
2017-07-03 0.432187
2017-07-04 0.750968
2017-07-05 0.591830
I want to add ten new values to rand
column by extending index column by the number of added values i.e. until 2017-07-19
. I wonder if there is any way that the time index can be extended automatically only by adding values to rand
column.