I have a dataframe with missing rows that I interpolate and resample. I would like to know if there was a way to grab the index of the rows that are added to the dataframe when I resample it ?
This is how I create/resample/interpolate the dataframe:
import numpy as np
import pandas as pd
from datetime import *
# Create df and drop a few rows
rng = pd.date_range('2000-01-01', periods=365, freq='D')
df = pd.DataFrame({'Val': np.random.randn(len(rng)) },index = rng)
df = df.drop([datetime(2000,1,5),datetime(2000,1,24)])
df = df.resample('D').interpolate(method='linear')