mdf_reader.common.converters

Module Contents

Classes

df_converters

Attributes

converters

class df_converters(dtype)[source]
object_to_numeric(self, data, scale=None, offset=None)[source]

Converts the object type elements of a pandas series to numeric type. Right spaces are trated as ceros. Scale and offset can optionally be applied. The final data type according to the class dtype.

Parameters
  • self (dtype, numeric_scale and numeric_offset) – Pandas dataframe with a column per report sections. The sections in the columns as a block strings.

  • data (pandas.Series) – Series with data to convert. Data must be object type

Keyword Arguments
  • scale (numeric, optional) – Scale to apply after conversion to numeric

  • offset (numeric, optional) – Offset to apply after converion to numeric

Returns

data – Data series of type self.dtype

Return type

pandas.Series

object_to_object(self, data, disable_white_strip=False)[source]
object_to_datetime(self, data, datetime_format='%Y%m%d')[source]
converters[source]