|
16 | 16 | from pandas.io.common import _is_url, urlopen, parse_url
|
17 | 17 | from pandas.io.parsers import TextParser
|
18 | 18 | from pandas.compat import (lrange, lmap, u, string_types, iteritems, text_type,
|
19 |
| - raise_with_traceback, OrderedDict) |
| 19 | + raise_with_traceback) |
20 | 20 | from pandas.core import common as com
|
21 | 21 | from pandas import Series
|
22 | 22 |
|
@@ -485,8 +485,8 @@ def _parse_tables(self, doc, match, kwargs):
|
485 | 485 | pattern = match.pattern
|
486 | 486 |
|
487 | 487 | # 1. check all descendants for the given pattern and only search tables
|
488 |
| - # 2. go up the tree until we find a table or if we are a table use that |
489 |
| - query = '//table/*[re:test(text(), %r)]/ancestor-or-self::table' |
| 488 | + # 2. go up the tree until we find a table |
| 489 | + query = '//table//*[re:test(text(), %r)]/ancestor::table' |
490 | 490 | xpath_expr = u(query) % pattern
|
491 | 491 |
|
492 | 492 | # if any table attributes were given build an xpath expression to
|
@@ -786,9 +786,8 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None,
|
786 | 786 |
|
787 | 787 | tupleize_cols : bool, optional
|
788 | 788 | If ``False`` try to parse multiple header rows into a
|
789 |
| - :class:`~pandas.MultiIndex`. See :func:`~pandas.read_csv` for more |
790 |
| - details. Defaults to ``False`` for backwards compatibility. This is in |
791 |
| - contrast to other IO functions which default to ``True``. |
| 789 | + :class:`~pandas.MultiIndex`, otherwise return raw tuples. Defaults to |
| 790 | + ``False``. |
792 | 791 |
|
793 | 792 | thousands : str, optional
|
794 | 793 | Separator to use to parse thousands. Defaults to ``','``.
|
|
0 commit comments