numpy 1.22.4 Pypi GitHub Homepage
Other Docs
AttributesParametersBackRef

Attributes

func : function

Function used for the conversion.

default : any

Default value to return when the input corresponds to a missing value.

type : type

Type of the output.

_status : int

Integer representing the order of the conversion.

_mapper : sequence of tuples

Sequence of tuples (dtype, function, default value) to evaluate in order.

_locked : bool

Holds :None:None:`locked` parameter.

After initialization, an instance can be called to transform a string into another object. If the string is recognized as representing a missing value, a default value is returned.

Parameters

dtype_or_func : {None, dtype, function}, optional

If a dtype , specifies the input data type, used to define a basic function and a default value for missing data. For example, when dtype is float, the :None:None:`func` attribute is set to :None:None:`float` and the default value to :None:None:`np.nan`. If a function, this function is used to convert a string to another object. In this case, it is recommended to give an associated default value as input.

default : any, optional

Value to return by default, that is, when the string to be converted is flagged as missing. If not given, StringConverter tries to supply a reasonable default value.

missing_values : {None, sequence of str}, optional

None or sequence of strings indicating a missing value. If None then missing values are indicated by empty entries. The default is None .

locked : bool, optional

Whether the StringConverter should be locked to prevent automatic upgrade or not. Default is False.

Factory class for function transforming a string into another object (int, float).

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.lib._iotools.StringConverter.upgrade numpy.lib._iotools.StringConverter.update numpy.lib._iotools.StringConverter

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/lib/_iotools.py#450
type: <class 'type'>
Commit: