maxframe.liteframe.LiteFrame.astype#
- LiteFrame.astype(dtype, errors='raise')#
Cast a LiteFrame to a specified dtype.
- Parameters:
dtype (data type, or dict of column name -> data type) – Use a numpy.dtype or Python type to cast entire LiteFrame to the same type. Alternatively, use {col: dtype, …}, where col is a column label and dtype is a numpy.dtype or Python type to cast one or more of the DataFrame’s columns to column-specific types.
errors ({'raise', 'coerce'}, default 'raise') –
Control raising of exceptions on invalid data for provided dtype.
raise: allow exceptions to be raisedcoerce: uncastable values become null and the output dtype changes to the target type.
'ignore'is not supported by LiteFrame astype; use'coerce'for null-on-failure semantics.
- Returns:
Casted LiteFrame.
- Return type:
See also
LiteFrame.evalEvaluate a string expression to add columns.