phenopacket_mapper.utils.pandas_utils module
- phenopacket_mapper.utils.pandas_utils.loc_default(df: DataFrame, row_index: int, column_name: str, default: Any = '') Any [source]
Safely performs loc on a pd.DataFrame, returns default value if something goes wrong
- Parameters:
df – the dataframe
row_index – index of the row
column_name – name of the column
default – default value to return if some error occurs
- Returns:
Value at the row and column specified