fix: More robust removal of rows without data (only comments)
This commit is contained in:
parent
fc650e1207
commit
3e9f00ec2b
1 changed files with 5 additions and 2 deletions
7
plot.py
7
plot.py
|
@ -39,7 +39,7 @@ print_today = today.isoformat()
|
||||||
filename_now = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
filename_now = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
||||||
|
|
||||||
force_renew_plots = False
|
force_renew_plots = False
|
||||||
force_renew_dashboard = False
|
force_renew_dashboard = True
|
||||||
|
|
||||||
# https://www.tagesschau.de/ausland/europa/ursula-von-der-leyen-zu-corona-impfstoffen-101.html
|
# https://www.tagesschau.de/ausland/europa/ursula-von-der-leyen-zu-corona-impfstoffen-101.html
|
||||||
target_date_for_herd_immunity = datetime.date(2021, 9, 22)
|
target_date_for_herd_immunity = datetime.date(2021, 9, 22)
|
||||||
|
@ -72,7 +72,10 @@ def parse_rki(filename):
|
||||||
|
|
||||||
impfungen = raw_data[:-1].dropna(subset=['Datum']).fillna(0)
|
impfungen = raw_data[:-1].dropna(subset=['Datum']).fillna(0)
|
||||||
|
|
||||||
impfungen.drop(impfungen.tail(1).index,inplace=True) # remove Gesamt row
|
# Filter out rows without date in first column
|
||||||
|
impfungen['Datum'] = pd.to_datetime(impfungen['Datum'], errors='coerce')
|
||||||
|
impfungen = impfungen[pd.notna(impfungen['Datum'])]
|
||||||
|
|
||||||
|
|
||||||
dates = impfungen['Datum']
|
dates = impfungen['Datum']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue