Data

data

ccc.data

class ccc.data.Assets(data='/home/runner/work/Cost-of-Capital-Calculator/Cost-of-Capital-Calculator/ccc/ccc_asset_data.csv', start_year=2013)[source]

Constructor for the asset-entity type Records class.

Parameters
  • data (string or Pandas DataFrame) – string describes CSV file in which records data reside; DataFrame already contains records data; default value is the string ‘asset_data.csv’

  • start_year (integer) – specifies calendar year of the input data; default value is ASSET_DATA_CSV_YEAR.

Returns: Assets (class instance)

Raises

ValueError

  • if data is not the appropriate type. * if start_year is not an integer. * if files cannot be found.

Notes

Typical usage when using ccc_asset_data.csv input data is as follows:

>>> assets = Assets()

which uses all the default parameters of the constructor.

_read_data(data)[source]

Read Records data from file or use specified DataFrame as data.

Parameters

data (string or Pandas DataFrame) – data or path to data

Returns

None

property array_length

Length of arrays in Records class’s DataFrame.

property data_year

Records class original data year property.

static read_var_info()[source]

Read Assets variables metadata from JSON file; returns dictionary and specifies static varname sets listed below.