Skip to content

Commit a43d6b7

Browse files
committed
Cleaner imports
1 parent a1127f6 commit a43d6b7

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
import pandas.core.nanops as nanops
9090
import pandas.core.ops as ops
9191
import pandas.formats.format as fmt
92-
from pandas.formats.excel import ExcelFormatter
9392
from pandas.formats.printing import pprint_thing
9493
import pandas.tools.plotting as gfx
9594

@@ -1419,6 +1418,7 @@ def to_excel(self, excel_writer, sheet_name='Sheet1', na_rep='',
14191418
merge_cells=True, encoding=None, inf_rep='inf', verbose=True,
14201419
freeze_panes=None):
14211420

1421+
from pandas.formats.excel import ExcelFormatter
14221422
formatter = ExcelFormatter(self, na_rep=na_rep, cols=columns,
14231423
header=header,
14241424
float_format=float_format, index=index,

pandas/formats/excel.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from pandas.formats.printing import pprint_thing
1313
from pandas.types.common import (is_float)
1414
import pandas._libs.lib as lib
15-
from pandas.core.index import Index, MultiIndex
16-
from pandas.tseries.period import PeriodIndex
15+
from pandas import Index, MultiIndex, PeriodIndex
1716
from pandas.formats.common import get_level_lengths
1817

1918

pandas/formats/format.py

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from pandas.core.config import get_option, set_option
3333
from pandas.io.common import _get_handle, UnicodeWriter, _expand_user
3434
from pandas.formats.printing import adjoin, justify, pprint_thing
35-
from pandas.formats.excel import ExcelFormatter # for downstream # NOQA
3635
from pandas.formats.common import get_level_lengths
3736
import pandas.core.common as com
3837
import pandas._libs.lib as lib

pandas/formats/style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import pandas.core.common as com
2828
from pandas.core.indexing import _maybe_numeric_slice, _non_reducing_slice
2929
from pandas.util.decorators import Appender
30-
from pandas.formats.excel import ExcelFormatter
3130
try:
3231
import matplotlib.pyplot as plt
3332
from matplotlib import colors
@@ -207,6 +206,7 @@ def to_excel(self, excel_writer, sheet_name='Sheet1', na_rep='',
207206
merge_cells=True, encoding=None, inf_rep='inf', verbose=True,
208207
freeze_panes=None):
209208

209+
from pandas.formats.excel import ExcelFormatter
210210
formatter = ExcelFormatter(self, na_rep=na_rep, cols=columns,
211211
header=header,
212212
float_format=float_format, index=index,

0 commit comments

Comments
 (0)