We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e98b72 commit 441e8d5Copy full SHA for 441e8d5
pandas/io/tests/test_pytables.py
@@ -180,14 +180,25 @@ def test_store_hierarchical(self):
180
index = MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'],
181
['one', 'two', 'three']],
182
labels=[[0, 0, 0, 1, 1, 2, 2, 3, 3, 3],
183
- [0, 1, 2, 0, 1, 1, 2, 0, 1, 2]])
+ [0, 1, 2, 0, 1, 1, 2, 0, 1, 2]],
184
+ names=['foo', 'bar'])
185
frame = DataFrame(np.random.randn(10, 3), index=index,
186
columns=['A', 'B', 'C'])
187
188
self._check_roundtrip(frame, tm.assert_frame_equal)
189
self._check_roundtrip(frame.T, tm.assert_frame_equal)
190
self._check_roundtrip(frame['A'], tm.assert_series_equal)
191
192
+ # check that the
193
+ try:
194
+ store = HDFStore(self.scratchpath)
195
+ store['frame'] = frame
196
+ recons = store['frame']
197
+ assert(recons.index.names == ['foo', 'bar'])
198
+ finally:
199
+ store.close()
200
+ os.remove(self.scratchpath)
201
+
202
def test_store_mixed(self):
203
def _make_one():
204
df = tm.makeDataFrame()
0 commit comments