def getExtrapolatedInterpolatedValue(x, y):
    global dataGrid
if x not in dataGrid.index:
    dataGrid.ix[x] = nan
dataGrid = dataGrid.sort()
dataGrid = dataGrid.interpolate(method='index', axis=0).ffill(axis=0).bfill(
    axis=0)
if y not in dataGrid.columns.values:
    dataGrid = dataGrid.reindex(columns=numpy.append(dataGrid.columns.
        values, y))
dataGrid = dataGrid.sort_index(axis=1)
Интерполяция на DataFrame в пандах