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):
1068
1068
def _validate_usecols (usecols , names ):
1069
1069
"""
1070
1070
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
1072
1072
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.
1073
1089
"""
1074
1090
missing = [c for c in usecols if c not in names ]
1075
1091
if len (missing ) > 0 :
@@ -1078,6 +1094,8 @@ def _validate_usecols(usecols, names):
1078
1094
"columns expected but not found: {missing}" .format (missing = missing )
1079
1095
)
1080
1096
1097
+ return usecols
1098
+
1081
1099
1082
1100
def _validate_skipfooter_arg (skipfooter ):
1083
1101
"""
You can’t perform that action at this time.
0 commit comments