using the dropna method with parameters eg (subset=[varlist]) can get the same result and introduces fewer separate functions