Juli29

RKI Covid

Apr 13th, 2021 (edited)
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import pandas as pd
  2. df = pd.read_csv('data/RKI_COVID19.csv')
  3. datum = '2021/04/11'
  4.  
  5. # Angefordertes Datum herausfiltern
  6. filt1 = df['Meldedatum'].str.contains(datum)
  7. dff1=df[filt1]
  8.  
  9. # Ungültige Fälle aussortieren, s. https://www.arcgis.com/home/item.html?id=f10774f1c63e40168479a1feb6c7ca74
  10. filt2 = ((dff1['NeuerFall']==1) | (dff1['NeuerFall']==0))
  11. dff2 = dff1[filt2]
  12.  
  13. # Anzahl der Neuinfktionen an angefordertem Tag berechnen
  14. dff2['AnzahlFall'].sum()
Add Comment
Please, Sign In to add comment