@@ -20,7 +20,7 @@ def test_complex_fixed(tmp_path, setup_path):
20
20
)
21
21
22
22
path = tmp_path / setup_path
23
- df .to_hdf (path , "df" )
23
+ df .to_hdf (path , key = "df" )
24
24
reread = read_hdf (path , "df" )
25
25
tm .assert_frame_equal (df , reread )
26
26
@@ -30,7 +30,7 @@ def test_complex_fixed(tmp_path, setup_path):
30
30
columns = list ("ABCDE" ),
31
31
)
32
32
path = tmp_path / setup_path
33
- df .to_hdf (path , "df" )
33
+ df .to_hdf (path , key = "df" )
34
34
reread = read_hdf (path , "df" )
35
35
tm .assert_frame_equal (df , reread )
36
36
@@ -43,8 +43,8 @@ def test_complex_table(tmp_path, setup_path):
43
43
)
44
44
45
45
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" )
48
48
tm .assert_frame_equal (df , reread )
49
49
50
50
df = DataFrame (
@@ -54,7 +54,7 @@ def test_complex_table(tmp_path, setup_path):
54
54
)
55
55
56
56
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" )
58
58
reread = read_hdf (path , "df" )
59
59
tm .assert_frame_equal (df , reread )
60
60
@@ -77,7 +77,7 @@ def test_complex_mixed_fixed(tmp_path, setup_path):
77
77
index = list ("abcd" ),
78
78
)
79
79
path = tmp_path / setup_path
80
- df .to_hdf (path , "df" )
80
+ df .to_hdf (path , key = "df" )
81
81
reread = read_hdf (path , "df" )
82
82
tm .assert_frame_equal (df , reread )
83
83
@@ -106,7 +106,7 @@ def test_complex_mixed_table(tmp_path, setup_path):
106
106
tm .assert_frame_equal (df .loc [df .A > 2 ], result )
107
107
108
108
path = tmp_path / setup_path
109
- df .to_hdf (path , "df" , format = "table" )
109
+ df .to_hdf (path , key = "df" , format = "table" )
110
110
reread = read_hdf (path , "df" )
111
111
tm .assert_frame_equal (df , reread )
112
112
@@ -120,7 +120,7 @@ def test_complex_across_dimensions_fixed(tmp_path, setup_path):
120
120
comps = [tm .assert_series_equal , tm .assert_frame_equal ]
121
121
for obj , comp in zip (objs , comps ):
122
122
path = tmp_path / setup_path
123
- obj .to_hdf (path , "obj" , format = "fixed" )
123
+ obj .to_hdf (path , key = "obj" , format = "fixed" )
124
124
reread = read_hdf (path , "obj" )
125
125
comp (obj , reread )
126
126
@@ -131,7 +131,7 @@ def test_complex_across_dimensions(tmp_path, setup_path):
131
131
df = DataFrame ({"A" : s , "B" : s })
132
132
133
133
path = tmp_path / setup_path
134
- df .to_hdf (path , "obj" , format = "table" )
134
+ df .to_hdf (path , key = "obj" , format = "table" )
135
135
reread = read_hdf (path , "obj" )
136
136
tm .assert_frame_equal (df , reread )
137
137
@@ -172,10 +172,10 @@ def test_complex_series_error(tmp_path, setup_path):
172
172
173
173
path = tmp_path / setup_path
174
174
with pytest .raises (TypeError , match = msg ):
175
- s .to_hdf (path , "obj" , format = "t" )
175
+ s .to_hdf (path , key = "obj" , format = "t" )
176
176
177
177
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 )
179
179
reread = read_hdf (path , "obj" )
180
180
tm .assert_series_equal (s , reread )
181
181
0 commit comments