Repository: pandas-dev/pandas

Issue:
pd.Series.interpolate() ValueError for some methods with TZ localized index
#### Code Sample, a copy-pastable example if possible

```python
import pandas as pd

ser = pd.Series([1.0, pd.np.nan, 2.0], index=pd.date_range(
    start='20190101T0000', freq='1h', periods=3))
print(ser.interpolate(method='pad'))
print(ser.tz_localize('UTC').interpolate(method='pad'))  # raises ValueError
```
#### Problem description

Interpolation of a Series with a TZ localized DatetimeIndex raises a ValueError when method  is not one of (linear, index, values, nearest, time). This does not occur with version 0.24.2, and I think the bug was introduced in https://github.com/pandas-dev/pandas/pull/25394.

#### Expected Output
2019-01-01 00:00:00    1.0
2019-01-01 01:00:00    1.0
2019-01-01 02:00:00    2.0
Freq: H, dtype: float64
2019-01-01 00:00:00+00:00    1.0
2019-01-01 01:00:00+00:00    1.0
2019-01-01 02:00:00+00:00    2.0
Freq: H, dtype: float64

#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
                                            
INSTALLED VERSIONS     
------------------      
commit           : d749aae9549329912edabc646fcda4083af18e22
python           : 3.7.2.final.0
python-bits      : 64  
OS               : Linux
OS-release       : 5.1.12-300.fc30.x86_64
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None 
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.0+19.gd749aae954
numpy            : 1.16.4
pytz             : 2019.1
dateutil         : 2.8.0
pip              : 18.1
setuptools       : 40.6.2
Cython           : 0.29.12
pytest           : 5.0.1
hypothesis       : 4.28.2
sphinx           : 1.8.5
blosc            : 1.8.0
feather          : None
xlsxwriter       : 1.1.8
lxml.etree       : 4.3.4
html5lib         : 1.0.1
pymysql          : None
psycopg2         : None
jinja2           : 2.10.1
IPython          : 7.6.1
pandas_datareader: None
bs4              : 4.8.0
bottleneck       : 1.2.1
fastparquet      : 0.3.1
gcsfs            : None
lxml.etree       : 4.3.4
matplotlib       : 3.1.1
numexpr          : 2.6.9
odfpy            : None
openpyxl         : 2.6.2
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : 0.3.0
scipy            : 1.3.0
sqlalchemy       : 1.3.6
tables           : 3.5.2
xarray           : 0.12.3
xlrd             : 1.2.0
xlwt             : 1.3.0
xlsxwriter       : 1.1.8

</details>



Discussion:

Resolving patch:
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -30,7 +30,6 @@
     is_bool,
     is_bool_dtype,
     is_datetime64_any_dtype,
-    is_datetime64_dtype,
     is_datetime64tz_dtype,
     is_dict_like,
     is_extension_array_dtype,
@@ -7023,7 +7022,7 @@ def interpolate(
             methods = {"index", "values", "nearest", "time"}
             is_numeric_or_datetime = (
                 is_numeric_dtype(index)
-                or is_datetime64_dtype(index)
+                or is_datetime64_any_dtype(index)
                 or is_timedelta64_dtype(index)
             )
             if method not in methods and not is_numeric_or_datetime:


Test patch:
diff --git a/pandas/tests/series/test_missing.py b/pandas/tests/series/test_missing.py
--- a/pandas/tests/series/test_missing.py
+++ b/pandas/tests/series/test_missing.py
@@ -1521,10 +1521,16 @@ def test_interp_nonmono_raise(self):
             s.interpolate(method="krogh")
 
     @td.skip_if_no_scipy
-    def test_interp_datetime64(self):
-        df = Series([1, np.nan, 3], index=date_range("1/1/2000", periods=3))
-        result = df.interpolate(method="nearest")
-        expected = Series([1.0, 1.0, 3.0], index=date_range("1/1/2000", periods=3))
+    @pytest.mark.parametrize("method", ["nearest", "pad"])
+    def test_interp_datetime64(self, method, tz_naive_fixture):
+        df = Series(
+            [1, np.nan, 3], index=date_range("1/1/2000", periods=3, tz=tz_naive_fixture)
+        )
+        result = df.interpolate(method=method)
+        expected = Series(
+            [1.0, 1.0, 3.0],
+            index=date_range("1/1/2000", periods=3, tz=tz_naive_fixture),
+        )
         assert_series_equal(result, expected)
 
     def test_interp_limit_no_nans(self):