#NEWLINE# def none_missing( df , columns = None ) : #NEWLINE# #INDENT# '\n    Asserts that there are no missing values (NaNs) in the DataFrame.\n\n    Parameters\n    ----------\n    df : DataFrame\n    columns : list\n      list of columns to restrict the check to\n\n    Returns\n    -------\n    df : DataFrame\n      same as the original\n    ' #NEWLINE# if ( columns is None ) : #NEWLINE# #INDENT# columns = df . columns #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# assert ( not df [ columns ] . isnull ( ) . any ( ) . any ( ) ) #NEWLINE# #UNINDENT# except AssertionError as e : #NEWLINE# #INDENT# missing = df [ columns ] . isnull ( ) #NEWLINE# msg = generic . bad_locations ( missing ) #NEWLINE# e . args = msg #NEWLINE# raise #NEWLINE# #UNINDENT# return df