From 4957e8b01b132703486ae3765bbd3d75da0f292a Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Mon, 20 Jul 2020 15:06:50 -0700 Subject: [PATCH] FIX: remove dependence on epoch2num --- pandas/plotting/_matplotlib/converter.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandas/plotting/_matplotlib/converter.py b/pandas/plotting/_matplotlib/converter.py index 05377e0c240b9..1ce727749c1e6 100644 --- a/pandas/plotting/_matplotlib/converter.py +++ b/pandas/plotting/_matplotlib/converter.py @@ -252,11 +252,7 @@ def _dt_to_float_ordinal(dt): preserving hours, minutes, seconds and microseconds. Return value is a :func:`float`. """ - if isinstance(dt, (np.ndarray, Index, Series)) and is_datetime64_ns_dtype(dt): - base = dates.epoch2num(dt.asi8 / 1.0e9) - else: - base = dates.date2num(dt) - return base + return dates.date2num(dt) # Datetime Conversion