So below is my code. The output, as a nested list, is that it goes on almost infinitely (not literally, just metaphorically) from left to right. Here is a video showing the output as a DF. But here's my problem.... I've been told before that my PyCharm is bewitched, and that people get wildly different appearances in their version of PyCharm. I have the latest updated version, straight out the box. It looks rather messy. Thoughts? Source code:
from bs4 import BeautifulSoup
import requests
import pandas as pd
r = requests.post('https://opir.fiu.edu/instructor_evals/instr_eval_result.asp', data={'Term': '1175', 'Coll':
'CBADM'})
soup = BeautifulSoup(r.text, 'lxml')
tables = [[x.text.strip() for x in y.find_all('td')] for y in soup.find_all('table')]
# This gives you a nested list. For instance,
# tables[0] # gives you the first table, in list form tables
# [1] # gives you the second table, in list form
df = pd.DataFrame(tables)
print(df)