T
T
Thempick2021-04-03 13:45:36
Python
Thempick, 2021-04-03 13:45:36

What to do if Pandas doesn't see the table?

I needed to read information from this site: https://bankrot.fedresurs.ru/?attempt=1
I had to read the first column of the table "Publication date (Moscow time)"
To do this, I wrote the following code:

import pandas as pd

inf, = pd.read_html(" https://bankrot.fedresurs.ru/?attempt=1 ", header=0, parse_dates=["Publication date (Moscow time)"])

inf.to_csv("calls.csv", index =False)

At the same time, I got the following error:
ValueError: No tables found matching pattern '.+'
But the information I need is contained in the element , which is used by Pandas
How can I fix this error?606846cc69143244508556.jpeg
60684706cf6df776418769.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-04-03
@Zarom

read_html is weird. Apparently you have a crooked documentation. And there are more than one tables on the page.

pd.read_html("https://bankrot.fedresurs.ru/?attempt=1", attrs = {'class': 'bank'}, header=0, parse_dates=True)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question