Python Forum
Pandas df.read_html dropping duplicate tables in html : Urgent Guidance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pandas df.read_html dropping duplicate tables in html : Urgent Guidance
#1
my question here

import pandas as pd
tables = pd.read_html('D:\\myhtml.html', header=0)
print (tables)
I have a html file locally with multiple tables. Sometimes the content of the table is exactly the same including headers. While reading it through pandas I have noticed that when two tables are exactly identical it will drop the second one as if it is not there. When I change one <td>Value</td> value in the second table it will read the second table also and display.

How can i stop pandas doing that and read every table

Attaching the exact HTML file. If you see there are 4 tables. Still I get only 3 tables values. The big 2 two tables have exact same data and it is publishing only first one

h t t p s : / / drive.google.com/file/d/0B5HhBthFvDrtMWNtRDBhS1lQcGM/view?usp=sharing
Reply
#2
Anybody has any clue about the above. I am still struggling with the simple stupid thing. Did i hit a bug in in Pandas :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  HTML Decoder pandas dataframe column mbrown009 3 1,055 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Hi, I need some guidance with the dialogue for my chatbot aaron10500 0 1,363 Jun-22-2021, 02:38 PM
Last Post: aaron10500
  Dropping Rows From A Data Frame Based On A Variable JoeDainton123 1 2,229 Aug-03-2020, 02:05 AM
Last Post: scidam
  Linear regression doubt - Urgent kumarants 6 3,123 May-05-2020, 04:11 PM
Last Post: kumarants
  python pandas to html with formatting slangswinger 0 1,342 Mar-24-2020, 05:38 PM
Last Post: slangswinger
  Pandas dataframe to join three tables using like condition among them sandeep_ganga 0 2,143 Nov-29-2019, 08:30 AM
Last Post: sandeep_ganga
  Dropping a column from pandas dataframe marco_ita 6 15,336 Sep-07-2019, 08:36 AM
Last Post: marco_ita
  Adding Tables and Extracting Values from Tables jamescox11480 5 3,469 Sep-29-2018, 04:49 PM
Last Post: jamescox11480
  Dropping all rows of multiple columns after the max of one cell Thunberd 2 2,959 Jun-01-2018, 10:18 PM
Last Post: Thunberd
  Pandas .to_excel() Dropping First Row of Data When Run from Anaconda Prompt kazoli 0 2,342 Mar-15-2018, 04:52 PM
Last Post: kazoli

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020