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

Method _reset_cache

pandas/core/base.py:106–115  ·  view source on GitHub ↗

Reset cached properties. If ``key`` is passed, only clears that key.

(self, key: str | None = None)

Source from the content-addressed store, hash-verified

104 return object.__repr__(self)
105
106 def _reset_cache(self, key: str | None = None) -> None:
107 """
108 Reset cached properties. If ``key`` is passed, only clears that key.
109 """
110 if not hasattr(self, "_cache"):
111 return
112 if key is None:
113 self._cache.clear()
114 else:
115 self._cache.pop(key, None)
116
117 def __sizeof__(self) -> int:
118 """

Callers 7

setitem_inplaceMethod · 0.80
ideleteMethod · 0.80
_set_levelsMethod · 0.80
_set_codesMethod · 0.80
_viewMethod · 0.80
copyMethod · 0.80
_set_namesMethod · 0.80

Calls 2

clearMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected