Cacao Chocolate Web Scraping with BeautifulSoup Q7

For Q7 of the project I’m having some trouble adding float() to the for loop

import codecademylib3_seaborn
from bs4 import BeautifulSoup
import requests
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

webpage_response = requests.get('')
webpage = webpage_response.content
soup = BeautifulSoup(webpage, 'html.parser')

rating ='.Rating')

ratings = []
for i in rating:
  i = i.get_text()


I saw in another post they did it as for i in range(len(rating)) and they added the float() to their code.

Is there some reason why I’m not able to add float() to my code above?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.