def _validate_parse_dates_arg(parse_dates):
 msg = "Only booleans, lists, and dictionaries are accepted for the 'parse_dates' parameter"
 if (parse_dates is not None):
  if is_scalar(parse_dates):
   if (not lib.is_bool(parse_dates)):
    raise TypeError(msg)
  elif (not isinstance(parse_dates, (list, dict))):
   raise TypeError(msg)
 return parse_dates

def _validate_parse_dates_arg ( parse_dates ) : msg = "Only booleans, lists, and dictionaries are accepted for the 'parse_dates' parameter" if ( parse_dates is not None ) : if is_scalar ( parse_dates ) : if ( not lib . is_bool ( parse_dates ) ) : raise TypeError ( msg ) elif ( not isinstance ( parse_dates , ( list , dict ) ) ) : raise TypeError ( msg ) return parse_dates
check whether or not the parse_dates parameter is a non-boolean scalar .