Skip to content

Commit a5fb107

Browse files
committed
add whatsnew
1 parent 7231f52 commit a5fb107

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/whatsnew/v1.1.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ MultiIndex
162162
I/O
163163
^^^
164164
- Bug in :meth:`read_json` where integer overflow was occuring when json contains big number strings. (:issue:`30320`)
165-
-
165+
- `read_csv` will now raise a ``ValueError`` when arguments `header` and `prefix` both are not None. (:issue:`27394`)
166166
-
167167

168168
Plotting

pandas/tests/frame/test_to_csv.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,10 @@ def test_to_csv_headers(self):
575575
recons.reset_index(inplace=True)
576576
tm.assert_frame_equal(to_df, recons)
577577

578-
def test_to_csv_raises_on_header_prefix():
578+
def test_to_csv_raises_on_header_prefix(self):
579579
msg = "Argument prefix must be None if argument header is not None"
580+
s = StringIO("0,1\n2,3")
580581
with pytest.raises(ValueError, match=msg):
581-
s = StringIO("0,1\n2,3")
582582
read_csv(s, header=0, prefix="_X")
583583

584584
def test_to_csv_multiindex(self, float_frame, datetime_frame):

0 commit comments

Comments
 (0)