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

Function _select_options

pandas/_config/config.py:650–665  ·  view source on GitHub ↗

returns a list of keys matching `pat` if pat=="all", returns all registered options

(pat: str)

Source from the content-addressed store, hash-verified

648
649
650def _select_options(pat: str) -> list[str]:
651 """
652 returns a list of keys matching `pat`
653
654 if pat=="all", returns all registered options
655 """
656 # short-circuit for exact key
657 if pat in _registered_options:
658 return [pat]
659
660 # else look through all of them
661 keys = sorted(_registered_options.keys())
662 if pat == "all": # reserved key
663 return keys
664
665 return [k for k in keys if re.search(pat, k, re.I)]
666
667
668def _get_root(key: str) -> tuple[dict[str, Any], str]:

Callers 3

_get_single_keyFunction · 0.85
describe_optionFunction · 0.85
reset_optionFunction · 0.85

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected