MCPcopy
hub / github.com/pandas-dev/pandas / _get_values_repr

Method _get_values_repr

pandas/core/arrays/categorical.py:2334–2351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2332 return f"{levheader}[{levstring.replace(' < ... < ', ' ... ')}]"
2333
2334 def _get_values_repr(self) -> str:
2335 from pandas.io.formats import format as fmt
2336
2337 assert len(self) > 0
2338
2339 vals = self._internal_get_values()
2340 fmt_values = fmt.format_array(
2341 vals,
2342 None,
2343 float_format=None,
2344 na_rep="NaN",
2345 quoting=QUOTE_NONNUMERIC,
2346 )
2347
2348 fmt_values = [i.strip() for i in fmt_values]
2349 joined = ", ".join(fmt_values)
2350 result = "[" + joined + "]"
2351 return result
2352
2353 def __repr__(self) -> str:
2354 """

Callers 1

__repr__Method · 0.95

Calls 3

_internal_get_valuesMethod · 0.95
stripMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected