message_ix_models.tests.project.ssp.test_transport.insert_nans
- message_ix_models.tests.project.ssp.test_transport.insert_nans(df: DataFrame, variable_expr: str, year_cond: Callable[[Hashable], bool]) DataFrame [source]
Replace zeros with
np.nan
in df.This occurs only where:
The ‘Variable’ column contains a string that matches variable_expr.
The year_cond returns
True
for the column name.