Skip to content

Commit 0f2af13

Browse files
committed
BUG: Small bug in helper functions _unpack and _parse_options_data
1 parent f014b01 commit 0f2af13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/io/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,12 @@ def get_data_famafrench(name, start=None, end=None):
216216

217217

218218
def _unpack(row, kind='td'):
219-
return [val.text for val in row.findAll(kind)]
219+
elts = row.findall('.//%s' % kind)
220+
return[val.text_content() for val in elts]
220221

221222

222223
def _parse_options_data(table):
223-
rows = table.findAll('tr')
224+
rows = table.findall('.//tr')
224225
header = _unpack(rows[0], kind='th')
225226
data = [_unpack(r) for r in rows[1:]]
226227
return TextParser(data, names=header).get_chunk()

0 commit comments

Comments
 (0)