Skip to main content

All Questions

0 votes
1 answer
52 views

How to extract a table from Wikipedia using BeautifulSoup and pandas

I am trying to extract a table from a Wikipedia page and display it in a pandas DataFrame. Here is my code: from bs4 import BeautifulSoup import requests import pandas as pd url = "https://en....
Shadrach Bobby's user avatar
0 votes
1 answer
65 views

bs4-approach to wikipedia-page: getting the infobox

i am currently trying to apply a bs4-approach to wikipedia-page: results do not store in a df due to the fact that scraping on Wikipedia is a very very common technique - where we can use an ...
zero's user avatar
  • 1,231
-2 votes
1 answer
65 views

trying to find out the logic of this page: approx ++ 100 results stored - and parsed with Python & BS4

trying to find out the logic that is behind this page: we have stored some results in the following db: https://www.raiffeisen.ch/rch/de/ueber-uns/raiffeisen-gruppe/organisation/raiffeisenbanken/...
zero's user avatar
  • 1,231
0 votes
1 answer
40 views

trying to apply a bs4-approach to wikipedia-page: results do not store in a df

due to the fact that scraping on Wikipedia is a very very common technique - where we can use an appropiate approach to work with many many different jobs - i did have some issues with getting back ...
zero's user avatar
  • 1,231
2 votes
2 answers
53 views

Convert string to dataframe after extracting using BeautifulSoup

import requests import pandas as pd from bs4 import BeautifulSoup as bs from io import StringIO url = "https://www.tickertape.in/stocks/oil-and-natural-gas-corporation-ONGC" r = requests....
Abinash Tripathy's user avatar
-1 votes
1 answer
50 views

Scraping the first table from a website using BeautifulSoup

I am trying to scrape the first table which is the ten countries with biggest biggest market capitalization table I have written the code but the table is not printed it is giving me out that is not ...
MACAVELI's user avatar
-4 votes
1 answer
106 views

Issue creating CSV from webscraping [closed]

I want to scrape this website https://www.thesoldiersproject.org/which-exo-members-are-in-the-military/ to retrieve the member name, enlisted date, and discharge date. But after I wrote and run my ...
Zoeyyyy's user avatar
0 votes
1 answer
36 views

Inserting DOM element to a HTML changing charecter "<" to html/xml character "&lt;" in Python using Pandas

I want to edit a html file and make a column editable in a table. I am using pandas and BeautifulSoup in python. Code Snippet: import pandas as pd from bs4 import BeautifulSoup with open("../...
SPL's user avatar
  • 29
1 vote
2 answers
80 views

How to parse out text from PDF into pandas dataframe

I am working on scraping data from several infographics on ridership data for Amtrak. I want to collect the yearly ridership #s and addresses of each station in the US. Here is my code for one ...
user2813606's user avatar
0 votes
1 answer
51 views

Unable to create similar column headers using list comprehension as pandas does for a particular table

I'm trying to scrape headers of a table from a webpage using list comprehension. The problem I'm facing is that when I create the same headers using pandas, the appearance is vastly different. Just to ...
MITHU's user avatar
  • 170
2 votes
2 answers
98 views

How to scrape links from summary section / link list of wikipedia?

update: many thanks for the replies - the help and all the efforts! some additional notes i have added. below (at the end) howdy i am trying to scrape all the Links of a large wikpedia page from the &...
zero's user avatar
  • 1,231
0 votes
1 answer
72 views

How to automate scraping wikipedia-info box specifically and print the data using python for more (other) wiki page?

How to automate scraping wikipedia info box specifically and print the data using python for any wiki page? My task is to automate printing the wikipedia infobox data. And that said i found out that ...
zero's user avatar
  • 1,231
-1 votes
2 answers
52 views

Why does Pandas not scrape the second table?

I want to scrape the 2 tables, but only get the result of the first table. Why? I'm using the same logic for both tables. import requests from bs4 import BeautifulSoup import pandas as pd # URL to ...
Miguel Angel Acosta Chinchilla's user avatar
1 vote
1 answer
57 views

Why pandas read_html automatically remove decimal separator?

I've been trying to scrape a table from a website, but for some reason pandas automatically turns every column into a string and therefore some values become totally useless. For example, 0,62 becomes ...
Giorgio's user avatar
  • 13
1 vote
1 answer
59 views

How to extract table from webpage that requires click/toggle?

I'm trying to extract tables from this webpage, but am only able to get the pitching table for example. I want to get the hitting table as well, which would in theory be this URL: https://www.covers....
austin0896's user avatar

15 30 50 per page
1
2 3 4 5
81