def test_nan(dataframe):
    """
    Test if dataframe contains nan value

    Parameters
    ----------
    dataframe: pandas dataframe

    Raises
    ------
    ValueError
        If contains nan, raise ValueError

    Returns
    -------
    is_valid: boolean
        True if did not contain nan, False if contain
    """
    is_valid = True
    for i in range(len(dataframe.columns)):
        if dataframe.isnull().any()[i] == True:
            is_valid = False
            raise ValueError("values contain nan")
    return is_valid