diff --git a/pandas/tests/frame/methods/test_to_csv.py b/pandas/tests/frame/methods/test_to_csv.py index be84eb9c85663..8a857c033a2de 100644 --- a/pandas/tests/frame/methods/test_to_csv.py +++ b/pandas/tests/frame/methods/test_to_csv.py @@ -142,8 +142,6 @@ def test_to_csv_from_csv4(self): result = read_csv(path, index_col="dt_index") result.index = pd.to_timedelta(result.index) - # TODO: remove renaming when GH 10875 is solved - result.index = result.index.rename("dt_index") result["dt_data"] = pd.to_timedelta(result["dt_data"]) 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): float_frame.to_csv(path) recons = self.read_csv(path) - # TODO to_csv drops column name - tm.assert_frame_equal(float_frame, recons, check_names=False) - tm.assert_frame_equal( - np.isinf(float_frame), np.isinf(recons), check_names=False - ) + tm.assert_frame_equal(float_frame, recons) + tm.assert_frame_equal(np.isinf(float_frame), np.isinf(recons)) def test_to_csv_from_csv_w_all_infs(self, float_frame): @@ -495,11 +490,8 @@ def test_to_csv_from_csv_w_all_infs(self, float_frame): float_frame.to_csv(path) recons = self.read_csv(path) - # TODO to_csv drops column name - tm.assert_frame_equal(float_frame, recons, check_names=False) - tm.assert_frame_equal( - np.isinf(float_frame), np.isinf(recons), check_names=False - ) + tm.assert_frame_equal(float_frame, recons) + tm.assert_frame_equal(np.isinf(float_frame), np.isinf(recons)) def test_to_csv_no_index(self): # GH 3624, after appending columns, to_csv fails @@ -868,8 +860,7 @@ def test_to_csv_stringio(self, float_frame): float_frame.to_csv(buf) buf.seek(0) recons = read_csv(buf, index_col=0) - # TODO to_csv drops column name - tm.assert_frame_equal(recons, float_frame, check_names=False) + tm.assert_frame_equal(recons, float_frame) def test_to_csv_float_format(self):