Skip to content

Commit af61e04

Browse files
authored
CLN: clean TODOs in csv test (pandas-dev#44113)
1 parent 1bcb841 commit af61e04

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

pandas/tests/frame/methods/test_to_csv.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ def test_to_csv_from_csv4(self):
142142

143143
result = read_csv(path, index_col="dt_index")
144144
result.index = pd.to_timedelta(result.index)
145-
# TODO: remove renaming when GH 10875 is solved
146-
result.index = result.index.rename("dt_index")
147145
result["dt_data"] = pd.to_timedelta(result["dt_data"])
148146

149147
tm.assert_frame_equal(df, result, check_index_type=True)
@@ -479,11 +477,8 @@ def test_to_csv_from_csv_w_some_infs(self, float_frame):
479477
float_frame.to_csv(path)
480478
recons = self.read_csv(path)
481479

482-
# TODO to_csv drops column name
483-
tm.assert_frame_equal(float_frame, recons, check_names=False)
484-
tm.assert_frame_equal(
485-
np.isinf(float_frame), np.isinf(recons), check_names=False
486-
)
480+
tm.assert_frame_equal(float_frame, recons)
481+
tm.assert_frame_equal(np.isinf(float_frame), np.isinf(recons))
487482

488483
def test_to_csv_from_csv_w_all_infs(self, float_frame):
489484

@@ -495,11 +490,8 @@ def test_to_csv_from_csv_w_all_infs(self, float_frame):
495490
float_frame.to_csv(path)
496491
recons = self.read_csv(path)
497492

498-
# TODO to_csv drops column name
499-
tm.assert_frame_equal(float_frame, recons, check_names=False)
500-
tm.assert_frame_equal(
501-
np.isinf(float_frame), np.isinf(recons), check_names=False
502-
)
493+
tm.assert_frame_equal(float_frame, recons)
494+
tm.assert_frame_equal(np.isinf(float_frame), np.isinf(recons))
503495

504496
def test_to_csv_no_index(self):
505497
# GH 3624, after appending columns, to_csv fails
@@ -868,8 +860,7 @@ def test_to_csv_stringio(self, float_frame):
868860
float_frame.to_csv(buf)
869861
buf.seek(0)
870862
recons = read_csv(buf, index_col=0)
871-
# TODO to_csv drops column name
872-
tm.assert_frame_equal(recons, float_frame, check_names=False)
863+
tm.assert_frame_equal(recons, float_frame)
873864

874865
def test_to_csv_float_format(self):
875866

0 commit comments

Comments
 (0)