File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2474,6 +2474,7 @@ class Fixed:
2474
2474
"""
2475
2475
2476
2476
pandas_kind : str
2477
+ format_type : str = "fixed" # GH#30962 needed by dask
2477
2478
obj_type : Type [Union [DataFrame , Series ]]
2478
2479
ndim : int
2479
2480
encoding : str
@@ -3132,6 +3133,7 @@ class Table(Fixed):
3132
3133
"""
3133
3134
3134
3135
pandas_kind = "wide_table"
3136
+ format_type : str = "table" # GH#30962 needed by dask
3135
3137
table_type : str
3136
3138
levels = 1
3137
3139
is_table = True
Original file line number Diff line number Diff line change 64
64
65
65
@pytest .mark .single
66
66
class TestHDFStore :
67
+ def test_format_type (self , setup_path ):
68
+ df = pd .DataFrame ({"A" : [1 , 2 ]})
69
+ with ensure_clean_path (setup_path ) as path :
70
+ with HDFStore (path ) as store :
71
+ store .put ("a" , df , format = "fixed" )
72
+ store .put ("b" , df , format = "table" )
73
+
74
+ assert store .get_storer ("a" ).format_type == "fixed"
75
+ assert store .get_storer ("b" ).format_type == "table"
76
+
67
77
def test_format_kwarg_in_constructor (self , setup_path ):
68
78
# GH 13291
69
79
You can’t perform that action at this time.
0 commit comments