Skip to content

Commit bb8e1da

Browse files
committed
Added test to reproduce issue #16583
1 parent bf99975 commit bb8e1da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/io/test_pytables.py

+8
Original file line numberDiff line numberDiff line change
@@ -5191,6 +5191,14 @@ def test_query_compare_column_type(self):
51915191
expected = df.loc[[], :]
51925192
tm.assert_frame_equal(expected, result)
51935193

5194+
def test_read_hdf_series_fixed(self):
5195+
# GH 16583
5196+
series = pd.Series([1, 2, 3])
5197+
with ensure_clean_path(self.path) as path:
5198+
series.to_hdf(path, key='data', format='fixed')
5199+
result = pd.read_hdf(path, key='data', mode='r')
5200+
tm.assert_series_equal(result, series)
5201+
51945202
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Need python 3.6")
51955203
def test_fspath(self):
51965204
with tm.ensure_clean('foo.h5') as path:

0 commit comments

Comments
 (0)