1data = []
2table = soup.find('table', attrs={'class':'lineItemsTable'})
3table_body = table.find('tbody')
4
5rows = table_body.find_all('tr')
6for row in rows:
7 cols = row.find_all('td')
8 cols = [ele.text.strip() for ele in cols]
9 data.append([ele for ele in cols if ele]) # Get rid of empty values