diff --git a/pandas/formats/common.py b/pandas/formats/common.py index 0218890fd4311..5779baed277ce 100644 --- a/pandas/formats/common.py +++ b/pandas/formats/common.py @@ -1,4 +1,4 @@ -def _get_level_lengths(levels, sentinel=''): +def get_level_lengths(levels, sentinel=''): """For each index in each level the function returns lengths of indexes. Parameters diff --git a/pandas/formats/excel.py b/pandas/formats/excel.py index aaf392a6af2fd..a3f75b33ce588 100644 --- a/pandas/formats/excel.py +++ b/pandas/formats/excel.py @@ -14,7 +14,7 @@ import pandas._libs.lib as lib from pandas.core.index import Index, MultiIndex from pandas.tseries.period import PeriodIndex -from pandas.formats.common import _get_level_lengths +from pandas.formats.common import get_level_lengths # from collections import namedtuple @@ -376,7 +376,7 @@ def _format_header_mi(self): columns = self.columns level_strs = columns.format(sparsify=self.merge_cells, adjoin=False, names=False) - level_lengths = _get_level_lengths(level_strs) + level_lengths = get_level_lengths(level_strs) coloffset = 0 lnum = 0 diff --git a/pandas/formats/format.py b/pandas/formats/format.py index 4fcac45468434..ef8c6b50b9b4e 100644 --- a/pandas/formats/format.py +++ b/pandas/formats/format.py @@ -33,7 +33,7 @@ from pandas.io.common import _get_handle, UnicodeWriter, _expand_user from pandas.formats.printing import adjoin, justify, pprint_thing from pandas.formats.excel import ExcelFormatter # for downstream # NOQA -from pandas.formats.common import _get_level_lengths +from pandas.formats.common import get_level_lengths import pandas.core.common as com import pandas._libs.lib as lib from pandas._libs.tslib import (iNaT, Timestamp, Timedelta, @@ -1189,7 +1189,7 @@ def _column_header(): sentinel = None levels = self.columns.format(sparsify=sentinel, adjoin=False, names=False) - level_lengths = _get_level_lengths(levels, sentinel) + level_lengths = get_level_lengths(levels, sentinel) inner_lvl = len(level_lengths) - 1 for lnum, (records, values) in enumerate(zip(level_lengths, levels)):