I have a problem with reading data from websites. Currently, while working on a desktop computer, I used the Pandas library. In its simplest form, the code looks like this:
df = pd.read_html('https://en.wikipedia.org/wiki/Coal', header = 0, decimal=",", thousands='.')
df[3].head()
and thanks to it I was able to download data without any problems. The problem occurred when I wanted to download data on my computer at work in the same way. One of the pages worked correctly and the code given above correctly downloaded the data, but on practically all the other pages when I run the code I get the following message.
URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it
Does anyone know how to deal with it? Why for one website the code worked correctly and for the rest not. (I would understand more if the code didn't work on all pages).
@@@EDIT I`m making my code at jupyter notebook localhost.