el1xr_opt.Modules.oM_InputCSVSource#
el1xr_opt CSV backend — reads a directory of oM_Dict_* / oM_Data_* files.
This preserves the model’s historical reading behaviour exactly: each data
table is read with pd.read_csv and its leading unnamed columns are set as a
nameless index.
- class el1xr_opt.Modules.oM_InputCSVSource.CSVSource(case_dir)[source]#
Bases:
InputSource- property dir_name: str#
- list_data_stems()[source]#
Stems of the data tables present (no
oM_Data_prefix, no_<case>.csvsuffix).- Return type:
set
- read_dict(stem)[source]#
Return the dimension dict for
stemas a plain DataFrame (no index).Returns an empty DataFrame if the dict is absent.
- Return type:
DataFrame- Parameters:
stem (str)
- read_data(stem)[source]#
Return a data table with its leading unnamed columns set as a nameless index.
This is the exact shape
oM_InputDataexpects: the same DataFrame the oldpd.read_csv+set_index(unnamed columns)code produced. RaisesFileNotFoundErrorif the stem is absent.- Return type:
DataFrame- Parameters:
stem (str)