Skip to content

Commit fe533e9

Browse files
committed
Merge pull request #5328 from jreback/hdf_repr
BUG: repr/str of storers in HDFStore was calling an incorrect method
2 parents 383010f + df05e3d commit fe533e9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pandas/io/pytables.py

-3
Original file line numberDiff line numberDiff line change
@@ -1914,9 +1914,6 @@ def __unicode__(self):
19141914
return "%-12.12s (shape->%s)" % (self.pandas_type, s)
19151915
return self.pandas_type
19161916

1917-
def __str__(self):
1918-
return self.__repr__()
1919-
19201917
def set_object_info(self):
19211918
""" set my pandas type & version """
19221919
self.attrs.pandas_type = str(self.pandas_kind)

pandas/io/tests/test_pytables.py

+10
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,16 @@ def test_repr(self):
313313
repr(store)
314314
str(store)
315315

316+
# storers
317+
with ensure_clean(self.path) as store:
318+
319+
df = tm.makeDataFrame()
320+
store.append('df',df)
321+
322+
s = store.get_storer('df')
323+
repr(s)
324+
str(s)
325+
316326
def test_contains(self):
317327

318328
with ensure_clean(self.path) as store:

0 commit comments

Comments
 (0)