Skip to content

read_material_properties

read_material_properties

read_material_properties() -> DataFrame

Reads material properties from the CSV file and returns them as a Pandas DataFrame.

Returns:

Type Description
DataFrame

pd.DataFrame: A DataFrame containing material properties indexed by material name.

Source code in cable_thermal_model/utils/read_material_properties.py
10
11
12
13
14
15
16
17
18
def read_material_properties() -> pd.DataFrame:
    """Reads material properties from the CSV file and returns them as a Pandas DataFrame.

    Returns:
        pd.DataFrame: A DataFrame containing material properties indexed by material name.
    """
    return pd.read_csv(Path(__file__).parents[2].resolve() / "data" / "material_properties.csv", sep=";").set_index(
        "material"
    )