I'm trying out this Python API for google trends. it created a pandas dataframe where the first column is the date and the others the keywords in kw_list, the values representing how much people search for the keywords.
This is my code
from pytrends.request import TrendReq # Login to Google. Only need to run this once, the rest of requests will use the same session. pytrend = TrendReq() # Create payload and capture API tokens. pytrend.build_payload(kw_list=['adele', 'wat']) interest_over_time_df = pytrend.interest_over_time() c = print(interest_over_time_df.iloc[-1]['adele']) print(c)
This outputs '5'. However, the type is Nonetype, so I can't compare this value to other values. How can I get the output as an integer?