Skip to content

Commit

Permalink
Make get_level_lengths non-private
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Apr 6, 2017
1 parent f62f02d commit 3b26087
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pandas/formats/common.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pandas/formats/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pandas/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)):
Expand Down

0 comments on commit 3b26087

Please sign in to comment.