diff --git a/pandas/core/common.py b/pandas/core/common.py index b0fe169c99f29..7b96700313012 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -223,10 +223,12 @@ def _mut_exclusive(**kwargs): def _not_none(*args): + """Returns a generator consisting of the arguments that are not None""" return (arg for arg in args if arg is not None) def _any_none(*args): + """Returns a boolean indicating if any argument is None""" for arg in args: if arg is None: return True @@ -234,6 +236,7 @@ def _any_none(*args): def _all_none(*args): + """Returns a boolean indicating if all arguments are None""" for arg in args: if arg is not None: return False @@ -241,6 +244,7 @@ def _all_none(*args): def _any_not_none(*args): + """Returns a boolean indicating if any argument is not None""" for arg in args: if arg is not None: return True @@ -248,6 +252,7 @@ def _any_not_none(*args): def _all_not_none(*args): + """Returns a boolean indicating if all arguments are not None""" for arg in args: if arg is None: return False @@ -255,6 +260,7 @@ def _all_not_none(*args): def _count_not_none(*args): + """Returns the count of arguments that are not None""" return sum(x is not None for x in args)