semantique.processor.types.get_value_type

Contents

semantique.processor.types.get_value_type#

semantique.processor.types.get_value_type(x)[source]#

Determine the value type of an object.

A semantique value type describes what kind of data an array contains. It differs from the very technical, computer-oriented numpy dtype categorization, which contains e.g. int, float, etc. Instead, the semantique value type describes data on a more general, statistical level. Currently it makes a distinction between five main value types: continuous and discrete for quantitative data and nominal, ordinal and binary for qualitative data. Additional value types exist for spatio-temporal data: datetime for timestamps, coords for spatial coordinate tuples, and geometry for spatial geometries stored in geopandas.GeoDataFrame objects.

Parameters:

x – Object to determine the value type of.

Returns:

list – A list containing the determined value type. If the object may be one of multiple value types this list will have multiple elements. If no value type could be determined for the given object, the function will return None.