import numpy as np


def clean_inf_nan(df):
    return df.replace([np.inf, -np.inf], np.nan)

bfa706069cca075c4a8b5d18788ce100897a32bb
<mask token>

<mask token>


def clean_inf_nan(df):
    return df.replace([np.inf, -np.inf], np.nan)

import numpy as np


def clean_inf_nan(df):
    return df.replace([np.inf, -np.inf], np.nan)
