From 72ffe974eb644437699957e96b7f9e8311f95c4c Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Sat, 15 Apr 2017 01:48:13 +0200 Subject: [PATCH] fixups from rebase --- pandas/plotting/_timeseries.py | 6 +++--- pandas/tests/plotting/test_converter.py | 13 +++++++------ setup.py | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pandas/plotting/_timeseries.py b/pandas/plotting/_timeseries.py index be683a78a409d..7533e417b0026 100644 --- a/pandas/plotting/_timeseries.py +++ b/pandas/plotting/_timeseries.py @@ -12,9 +12,9 @@ from pandas.formats.printing import pprint_thing import pandas.compat as compat -from pandas.tseries.converter import (TimeSeries_DateLocator, - TimeSeries_DateFormatter, - TimeSeries_TimedeltaFormatter) +from pandas.plotting._converter import (TimeSeries_DateLocator, + TimeSeries_DateFormatter, + TimeSeries_TimedeltaFormatter) # --------------------------------------------------------------------- # Plotting functions and monkey patches diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index 5351e26f0e62b..c21d46328c3d9 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -2,6 +2,7 @@ from datetime import datetime, date import numpy as np +import matplotlib.dates as dates from pandas import Timestamp, Period, Index from pandas.compat import u import pandas.util.testing as tm @@ -83,7 +84,7 @@ def test_conversion_float(self): rs = self.dtc.convert( Timestamp('2012-1-1 01:02:03', tz='UTC'), None, None) - xp = converter.dates.date2num(Timestamp('2012-1-1 01:02:03', tz='UTC')) + xp = dates.date2num(Timestamp('2012-1-1 01:02:03', tz='UTC')) tm.assert_almost_equal(rs, xp, decimals) rs = self.dtc.convert( @@ -97,18 +98,18 @@ def test_conversion_outofbounds_datetime(self): # 2579 values = [date(1677, 1, 1), date(1677, 1, 2)] rs = self.dtc.convert(values, None, None) - xp = converter.dates.date2num(values) + xp = dates.date2num(values) tm.assert_numpy_array_equal(rs, xp) rs = self.dtc.convert(values[0], None, None) - xp = converter.dates.date2num(values[0]) + xp = dates.date2num(values[0]) self.assertEqual(rs, xp) values = [datetime(1677, 1, 1, 12), datetime(1677, 1, 2, 12)] rs = self.dtc.convert(values, None, None) - xp = converter.dates.date2num(values) + xp = dates.date2num(values) tm.assert_numpy_array_equal(rs, xp) rs = self.dtc.convert(values[0], None, None) - xp = converter.dates.date2num(values[0]) + xp = dates.date2num(values[0]) self.assertEqual(rs, xp) def test_time_formatter(self): @@ -120,7 +121,7 @@ def test_dateindex_conversion(self): for freq in ('B', 'L', 'S'): dateindex = tm.makeDateIndex(k=10, freq=freq) rs = self.dtc.convert(dateindex, None, None) - xp = converter.dates.date2num(dateindex._mpl_repr()) + xp = dates.date2num(dateindex._mpl_repr()) tm.assert_almost_equal(rs, xp, decimals) def test_resolution(self): diff --git a/setup.py b/setup.py index eef3df7bbe6da..f8882e748927b 100755 --- a/setup.py +++ b/setup.py @@ -649,7 +649,7 @@ def pxd(name): 'pandas.io.msgpack', 'pandas._libs', 'pandas.formats', - 'pandas.plotting' + 'pandas.plotting', 'pandas.sparse', 'pandas.stats', 'pandas.util',