scitype#
- scitype(obj, candidate_scitypes=['Series', 'Panel', 'Hierarchical', 'Alignment', 'Table', 'Proba'], exclude_mtypes=['numpyflat', 'alignment_loc'])[source]#
Infer the scitype of an object.
See glossary for explanations of :glossary:`mtype` and :glossary:`scitype`.
- Parameters:
- objobject to infer type of - any type, should comply with some mtype spec
if as_scitype is provided, this needs to be mtype belonging to scitype
- candidate_scitypes: str or list of str, scitypes to pick from
valid scitype strings are in datatypes.SCITYPE_REGISTER
- exclude_mtypeslist of str, default = AMBIGUOUS_MTYPES
which mtypes to ignore in inferring mtype, default = ambiguous ones valid mtype strings are in datatypes.MTYPE_REGISTER
- Returns:
- str - the inferred sciype of “obj”, a valid scitype string
or None, if obj is None
scitype strings with explanation are in datatypes.SCITYPE_REGISTER
- Raises:
- TypeError if no type can be identified, or more than one type is identified