I need to get name of the bank and the sum to the pandas dataframe as two columns
from bs4 import BeautifulSoup
import requests
import html5lib
import pandas as pd
html_data = requests.get('https://en.wikipedia.org/wiki/List_of_largest_banks', timeout=20).content
soup = BeautifulSoup(html_data, "html.parser")
newDataFrame = pd.DataFrame(columns=['Name', 'Market Cap (US$ Billion)'])
for row in soup.find_all('tbody')[3].find_all('tr'):
col = row.find_all('td')
print(col)
so the first row is :
[
<td>1</td>,
<td><a href="/wiki/JPMorgan_Chase" title="JPMorgan Chase">JPMorgan Chase</a></td>,
<td>368.78</td>
]
how can i refer to the td inside td? If i want to get bank's name inside td for ex