Skip to content

Commit

Permalink
Fix CI: Python 3.7, Pandas<1
Browse files Browse the repository at this point in the history
AttributeError: type object object has no attribute dtype
  • Loading branch information
mwouts committed Mar 19, 2024
1 parent 72f3d19 commit f8be6aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itables/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _table_header(
html_header = df.head(0).to_html(escape=False)
except AttributeError:
# Polars DataFrames
html_header = pd.DataFrame(data=[], columns=df.columns).to_html()
html_header = pd.DataFrame(data=[], columns=df.columns, dtype=float).to_html()
match = pattern.match(html_header)
thead = match.groups()[0]
# Don't remove the index header for empty dfs
Expand Down

0 comments on commit f8be6aa

Please sign in to comment.