Examples
A series with 4 one minute timestamps:
import numpy as np
import pandas as pd
index = pd.date_range('1/1/2019', periods=4, freq='T')
series = pd.Series([0.0, None, 4.0, 5.0], index=index)
df = pd.DataFrame({'s':series})
df
Upsample the series into 30 second bins:
df.asfreq(freq='30S')
Upsample again, providing a fill value:
df.asfreq(freq='30S', fill_value=7.0)
Upsample again, providing a method:
df.asfreq(freq='30S', method='bfill')