@@ -20,7 +20,7 @@ def test_complex_fixed(tmp_path, setup_path):
2020 )
2121
2222 path = tmp_path / setup_path
23- df .to_hdf (path , "df" )
23+ df .to_hdf (path , key = "df" )
2424 reread = read_hdf (path , "df" )
2525 tm .assert_frame_equal (df , reread )
2626
@@ -30,7 +30,7 @@ def test_complex_fixed(tmp_path, setup_path):
3030 columns = list ("ABCDE" ),
3131 )
3232 path = tmp_path / setup_path
33- df .to_hdf (path , "df" )
33+ df .to_hdf (path , key = "df" )
3434 reread = read_hdf (path , "df" )
3535 tm .assert_frame_equal (df , reread )
3636
@@ -43,8 +43,8 @@ def test_complex_table(tmp_path, setup_path):
4343 )
4444
4545 path = tmp_path / setup_path
46- df .to_hdf (path , "df" , format = "table" )
47- reread = read_hdf (path , "df" )
46+ df .to_hdf (path , key = "df" , format = "table" )
47+ reread = read_hdf (path , key = "df" )
4848 tm .assert_frame_equal (df , reread )
4949
5050 df = DataFrame (
@@ -54,7 +54,7 @@ def test_complex_table(tmp_path, setup_path):
5454 )
5555
5656 path = tmp_path / setup_path
57- df .to_hdf (path , "df" , format = "table" , mode = "w" )
57+ df .to_hdf (path , key = "df" , format = "table" , mode = "w" )
5858 reread = read_hdf (path , "df" )
5959 tm .assert_frame_equal (df , reread )
6060
@@ -77,7 +77,7 @@ def test_complex_mixed_fixed(tmp_path, setup_path):
7777 index = list ("abcd" ),
7878 )
7979 path = tmp_path / setup_path
80- df .to_hdf (path , "df" )
80+ df .to_hdf (path , key = "df" )
8181 reread = read_hdf (path , "df" )
8282 tm .assert_frame_equal (df , reread )
8383
@@ -106,7 +106,7 @@ def test_complex_mixed_table(tmp_path, setup_path):
106106 tm .assert_frame_equal (df .loc [df .A > 2 ], result )
107107
108108 path = tmp_path / setup_path
109- df .to_hdf (path , "df" , format = "table" )
109+ df .to_hdf (path , key = "df" , format = "table" )
110110 reread = read_hdf (path , "df" )
111111 tm .assert_frame_equal (df , reread )
112112
@@ -120,7 +120,7 @@ def test_complex_across_dimensions_fixed(tmp_path, setup_path):
120120 comps = [tm .assert_series_equal , tm .assert_frame_equal ]
121121 for obj , comp in zip (objs , comps ):
122122 path = tmp_path / setup_path
123- obj .to_hdf (path , "obj" , format = "fixed" )
123+ obj .to_hdf (path , key = "obj" , format = "fixed" )
124124 reread = read_hdf (path , "obj" )
125125 comp (obj , reread )
126126
@@ -131,7 +131,7 @@ def test_complex_across_dimensions(tmp_path, setup_path):
131131 df = DataFrame ({"A" : s , "B" : s })
132132
133133 path = tmp_path / setup_path
134- df .to_hdf (path , "obj" , format = "table" )
134+ df .to_hdf (path , key = "obj" , format = "table" )
135135 reread = read_hdf (path , "obj" )
136136 tm .assert_frame_equal (df , reread )
137137
@@ -172,10 +172,10 @@ def test_complex_series_error(tmp_path, setup_path):
172172
173173 path = tmp_path / setup_path
174174 with pytest .raises (TypeError , match = msg ):
175- s .to_hdf (path , "obj" , format = "t" )
175+ s .to_hdf (path , key = "obj" , format = "t" )
176176
177177 path = tmp_path / setup_path
178- s .to_hdf (path , "obj" , format = "t" , index = False )
178+ s .to_hdf (path , key = "obj" , format = "t" , index = False )
179179 reread = read_hdf (path , "obj" )
180180 tm .assert_series_equal (s , reread )
181181
0 commit comments