# CONVERT INF TO NAN
import numpy as np
cols_inf_values = {{ cols_inf_values }}
{% if training %}
train_dataset[cols_inf_values] = train_dataset[cols_inf_values].replace([-np.inf, np.inf], np.nan)
{% endif %}
{% if test %}
test_dataset[cols_inf_values] = test_dataset[cols_inf_values].replace([-np.inf, np.inf], np.nan)
{% endif %}
