def none_missing(df, columns=None):
    """
    Asserts that there are no missing values (NaNs) in the DataFrame.

    Parameters
    ----------
    df : DataFrame
    columns : list
      list of columns to restrict the check to

    Returns
    -------
    df : DataFrame
      same as the original
    """
    if columns is None:
        columns = df.columns
    try:
        assert not df[columns].isnull().any().any()
    except __HOLE__ as e:
        missing = df[columns].isnull()
        msg = generic.bad_locations(missing)
        e.args = msg
        raise
    return df
dataset/ETHPy150Open TomAugspurger/engarde/engarde/checks.py/none_missing