Skip to content

Commit 708664c

Browse files
sparshsahmroeschke
authored andcommitted
DOC: Fix reference to rows in read_csv(index_col) error message (pandas-dev#57991)
* Fix reference to rows in `read_csv(index_col)` warning message * test - update expected error message * accept Co-authored-by: Matthew Roeschke <[email protected]> * accept Co-authored-by: Matthew Roeschke <[email protected]> --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 1cb1204 commit 708664c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/io/parsers/base_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def __init__(self, kwds) -> None:
174174
and all(map(is_integer, self.index_col))
175175
):
176176
raise ValueError(
177-
"index_col must only contain row numbers "
177+
"index_col must only contain integers of column positions "
178178
"when specifying a multi-index header"
179179
)
180180
else:

pandas/tests/io/parser/test_header.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_header_multi_index(all_parsers):
162162
{"index_col": ["foo", "bar"]},
163163
(
164164
"index_col must only contain "
165-
"row numbers when specifying "
165+
"integers of column positions when specifying "
166166
"a multi-index header"
167167
),
168168
),

0 commit comments

Comments
 (0)