File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1068,8 +1068,24 @@ def _evaluate_usecols(usecols, names):
10681068def _validate_usecols (usecols , names ):
10691069 """
10701070 Validates that all usecols are present in a given
1071- list of names, if not, raise a ValueError that
1071+ list of names. If not, raise a ValueError that
10721072 shows what usecols are missing.
1073+
1074+ Parameters
1075+ ----------
1076+ usecols : iterable of usecols
1077+ The columns to validate are present in names.
1078+ names : iterable of names
1079+ The column names to check against.
1080+
1081+ Returns
1082+ -------
1083+ usecols : iterable of usecols
1084+ The `usecols` parameter if the validation succeeds.
1085+
1086+ Raises
1087+ ------
1088+ ValueError : Detailing which usecols are missing, if any.
10731089 """
10741090 missing = [c for c in usecols if c not in names ]
10751091 if len (missing ) > 0 :
@@ -1078,6 +1094,8 @@ def _validate_usecols(usecols, names):
10781094 "columns expected but not found: {missing}" .format (missing = missing )
10791095 )
10801096
1097+ return usecols
1098+
10811099
10821100def _validate_skipfooter_arg (skipfooter ):
10831101 """
You can’t perform that action at this time.
0 commit comments