diff --git a/pandas/core/common.py b/pandas/core/common.py index 8bdff9d0b1a849..0e92a5056daae8 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -401,13 +401,6 @@ def standardize_mapping(into): return into -def sentinel_factory(): - class Sentinel(object): - pass - - return Sentinel() - - def random_state(state=None): """ Helper function for processing random_state arguments. diff --git a/pandas/io/formats/html.py b/pandas/io/formats/html.py index f41749e0a7745d..2d8b40016c9af0 100644 --- a/pandas/io/formats/html.py +++ b/pandas/io/formats/html.py @@ -12,7 +12,6 @@ from pandas.core.dtypes.generic import ABCMultiIndex from pandas import compat -import pandas.core.common as com from pandas.core.config import get_option from pandas.io.common import _is_url @@ -190,7 +189,7 @@ def _write_col_header(self, indent): if self.fmt.sparsify: # GH3547 - sentinel = com.sentinel_factory() + sentinel = object() else: sentinel = False levels = self.columns.format(sparsify=sentinel, adjoin=False, @@ -386,7 +385,7 @@ def _write_hierarchical_rows(self, fmt_values, indent): if self.fmt.sparsify: # GH3547 - sentinel = com.sentinel_factory() + sentinel = object() levels = frame.index.format(sparsify=sentinel, adjoin=False, names=False) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 598453eb92d250..61862ee0028d3f 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1322,7 +1322,7 @@ def _get_level_lengths(index, hidden_elements=None): Result is a dictionary of (level, inital_position): span """ - sentinel = com.sentinel_factory() + sentinel = object() levels = index.format(sparsify=sentinel, adjoin=False, names=False) if hidden_elements is None: