I am trying to read an local HTML file with pandas so I can convert it to a Dataframe but I am getting this error:
ValueError: invalid literal for int() with base 10: '0.5'
df = pd.read_html(loca_url)
I am sending the file attached so you can download it and try. Thanks for your help in advanced.
CodePudding user response:
There is a problem with html file in line 32:
<th colspan="0.5" >Material: </th>
According to html documentation colspan attribute should be an integer.
You need to fix the above mentioned line to:
<th colspan="1" >Material: </th>
or another desired integer. Changing it to 1 solved it for me.