id_translation.Translator.extract_names#
- Translator.extract_names(translatable, *, ignore_names=None, io_kwargs=None, raising=False)[source]#
Extract names in translatable.
Perform name extraction. The names are the first input to the
map()method, with the second being thesources. Does not callinitialize_sources().- Parameters:
translatable – A data structure to map names for.
ignore_names – Names not to translate, or a predicate
(NameType) -> bool.io_kwargs – Keyword arguments for the IO class (e.g.
PandasIO).raising – If
False(the default), returnNoneinstead of raisingMissingNamesErrorwhen name extraction fails.
- Returns:
Names to map to sources.
- Raises:
MissingNamesError – If names cannot be derived (only when
raising=True).