Formatting# Module for formatting type and functions. as_type(value, types=[<class 'int'>, <class 'float'>])[source]# Tries to convert value to given data types. Arguments valueobjectThe value to be converted. typeslist of typesThe list of types to try to convert the value to. Returns valueobjectThe value converted to the types if possible. ensure(value, dtype)[source]# Ensure values have a specified type but allowing for None values. Arguments valueobjectThe value to copy dtypeclassThe class type of the value to be copied. Returns valueobjectThe value with the requested type.