Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ Bug Fixes
- Bug in ``sum`` of a ``timedelta64[ns]`` series (:issue:`6462`)
- Bug in ``resample`` with a timezone and certain offsets (:issue:`6397`)
- Bug in ``iat/iloc`` with duplicate indices on a Series (:issue:`6493`)
- Bug in ``read_html`` where nan's were incorrectly being used to indicate
missing values in text. Should use the empty string for consistency with the
rest of pandas (:issue:`5129`).
- Bug in ``read_html`` tests where redirected invalid URLs would make one test
fail (:issue:`6445`).

pandas 0.13.1
-------------
Expand Down
11 changes: 6 additions & 5 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,9 @@ def _expand_elements(body):
lens_max = lens.max()
not_max = lens[lens != lens_max]

empty = ['']
for ind, length in iteritems(not_max):
body[ind] += [np.nan] * (lens_max - length)
body[ind] += empty * (lens_max - length)


def _data_to_frame(data, header, index_col, skiprows, infer_types,
Expand Down Expand Up @@ -760,15 +761,15 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None,
the table in the HTML. These are not checked for validity before being
passed to lxml or Beautiful Soup. However, these attributes must be
valid HTML table attributes to work correctly. For example, ::

attrs = {'id': 'table'}

is a valid attribute dictionary because the 'id' HTML tag attribute is
a valid HTML attribute for *any* HTML tag as per `this document
<http://www.w3.org/TR/html-markup/global-attributes.html>`__. ::

attrs = {'asdf': 'table'}

is *not* a valid attribute dictionary because 'asdf' is not a valid
HTML attribute even if it is a valid XML attribute. Valid HTML 4.01
table attributes can be found `here
Expand Down
Loading