<jupyter_start><jupyter_text>Problem: Manchester City hat einen Wert von 1.09 Milliarden. Wie mache ich aus den Milliarden Millionen?Vermutlich mit einer if-Schleife. Aber wie mach ich aus dem 1.09 Mrd € eine int und rechne danach damit?<jupyter_code>for wert in pl_beträge[2:][::2]:
    if wert == int("1.09 Mrd. €"):
        1.09 * 1000
    print((wert.text))

       

pl_teamwertliste = []
for team, wert in zip(pl_vereine,pl_beträge[2:][::2]):
    team = team.text
    wert = float(wert.text.replace(" Mio. €","").replace(" Mrd. €","").replace(",","."))
    minidict = {"Team": team,
                "Wert": wert}
    pl_teamwertliste.append(minidict)
pd.DataFrame(pl_teamwertliste)<jupyter_output><empty_output><jupyter_text>Bundesliga:<jupyter_code>headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
url = 'https://www.transfermarkt.ch/1-bundesliga/startseite/wettbewerb/L1/plus/?saison_id=2018'
r = requests.get(url, headers=headers)
soup = BeautifulSoup(r.text, 'html.parser')
bl_vereine = soup.find_all("td", {"class":"hauptlink no-border-links show-for-small show-for-pad"})
bl_beträge = soup.find_all("td", {"class":"rechts show-for-small show-for-pad nowrap"})
bl_teamwertliste = []
for team, wert in zip(bl_vereine,bl_beträge[2:][::2]):
    team = team.text
    wert = float(wert.text.replace(" Mio. €","").replace(",","."))
    minidict = {"Team": team,
                "Wert": wert}
    bl_teamwertliste.append(minidict)
pd.DataFrame(bl_teamwertliste)<jupyter_output><empty_output><jupyter_text>Kombiniert:<jupyter_code>bl_teamwertliste = []
for team, wert in zip(bl_vereine,bl_beträge[2:][::2]):
    team = team.text
    wert = float(wert.text.replace(" Mio. €","").replace(",","."))
    minidict = {"Team": team,
                "Wert": wert}
    bl_teamwertliste.append(minidict)
    
    pl_teamwertliste = []
for team, wert in zip(pl_vereine,pl_beträge[2:][::2]):
    team = team.text
    wert = float(wert.text.replace(" Mio. €","").replace(" Mrd. €","").replace(",","."))
    minidict = {"Team": team,
                "Wert": wert}
    pl_teamwertliste.append(minidict)
bl_pl_teamwwertliste = bl_teamwertliste + pl_teamwertliste
pd.DataFrame(bl_pl_teamwwertliste)
bl_allejahre = []
jahre = list(range(2010,2019))

for jahr in jahre:
    url = "https://www.transfermarkt.ch/1-bundesliga/startseite/wettbewerb/L1/plus/?saison_id="
    url = url+str(jahr)
    print(url)
    headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
    r = requests.get(url, headers=headers)
    soup = BeautifulSoup(r.text, 'html.parser')
    
    bl_vereine = soup.find_all('td', {'class':'hauptlink no-border-links show-for-small show-for-pad'})
    bl_beträge = soup.find_all('td', {'class':'rechts show-for-small show-for-pad nowrap'})
    
    for team, wert in zip(bl_vereine, bl_beträge[2:][::2]):
        team = team.text
        wert = float(wert.text.replace(' Mio. €', '').replace(',', '.'))
        minidict = {'Team': team,
                    'Wert': wert,
                    'Saison':str(jahr)}
        bl_allejahre.append(minidict)
pl_allejahre = []
jahre = list(range(2010,2019))

for jahr in jahre:
    url = "https://www.transfermarkt.ch/premier-league/startseite/wettbewerb/GB1/plus/?saison_id="
    url = url+str(jahr)
    print(url)
    headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
    r = requests.get(url, headers=headers)
    soup = BeautifulSoup(r.text, 'html.parser')
    
    pl_vereine = soup.find_all('td', {'class':'hauptlink no-border-links show-for-small show-for-pad'})
    pl_beträge = soup.find_all('td', {'class':'rechts show-for-small show-for-pad nowrap'})
    
    for team, wert in zip(pl_vereine, pl_beträge[2:][::2]):
        team = team.text
        wert = float(wert.text.replace(' Mio. €', '').replace(" Mrd. €","").replace(',', '.'))
        minidict = {'Team': team,
                    'Wert': wert,
                    'Saison':str(jahr)}
        pl_allejahre.append(minidict)
bl_pl_allejahre = bl_allejahre + pl_allejahre
bl_pl_allejahre<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1735001158211721, 'fraction_numerical': 0.030808431781329627, 'mean_word_length': 3.6530172413793105, 'pattern_counts': {'":': 10, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 3, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '127903', 'license': 'MIT', 'n_tokens_mistral': 1801, 'n_tokens_neox': 1701, 'n_words': 296, 'path': 'Premier League Kaderwerte.ipynb', 'repo_name': 'Jayjayfox/kurstagzwei', 'size': '4317'}