code: def test_interp_non_timedelta_index(self, interp_methods_ind, ind):
      # gh 21662
      df = pd.DataFrame([0, 1, np.nan, 3], index=ind)
  
      method, kwargs = interp_methods_ind
      if method == "pchip":
          pytest.importorskip("scipy")
  
      if method == "linear":
          result = df[0].interpolate(**kwargs)
          expected = Series([0.0, 1.0, 2.0, 3.0], name=0, index=ind)
          tm.assert_series_equal(result, expected)
      else:
          expected_error = (
              "Index column must be numeric or datetime type when "
              f"using {method} method other than linear. "
              "Try setting a numeric or datetime index column before "
              "interpolating."
          )
          with pytest.raises(ValueError, match=expected_error):
              df[0].interpolate(method=method, **kwargs)
  
imports: import numpy
  import pytest
  import pandas.util._test_decorators
  import pandas
  from pandas import Index, MultiIndex, Series, date_range, isna
  import pandas._testing
label_desc: Use image node_id 47 for calling the TestSeriesInterpolateData obj's underlying member method code with example usage: obj.test_interp_non_timedelta_index(interp_methods_ind, ind) without return types