File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2472,6 +2472,7 @@ class Fixed:
24722472 """
24732473
24742474 pandas_kind : str
2475+ format_type : str = "fixed" # GH#30962 needed by dask
24752476 obj_type : Type [Union [DataFrame , Series ]]
24762477 ndim : int
24772478 encoding : str
@@ -3129,6 +3130,7 @@ class Table(Fixed):
31293130 """
31303131
31313132 pandas_kind = "wide_table"
3133+ format_type : str = "table" # GH#30962 needed by dask
31323134 table_type : str
31333135 levels = 1
31343136 is_table = True
Original file line number Diff line number Diff line change 6464
6565@pytest .mark .single
6666class 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+
6777 def test_format_kwarg_in_constructor (self , setup_path ):
6878 # GH 13291
6979
You can’t perform that action at this time.
0 commit comments