@@ -252,7 +252,7 @@ def _parse_times_for_sheet(self, sheet):
252
252
@staticmethod
253
253
def retain_header (header ):
254
254
"""Ignore irrelevant headers."""
255
- return (( all ([
255
+ return all ([
256
256
# include "Total NAATs - [last|previous] 7 days ..."
257
257
# include "Total RT-PCR diagnostic tests - [last|previous] 7 days ..."
258
258
# include "NAAT positivity rate - [last|previous] 7 days ..."
@@ -270,17 +270,15 @@ def retain_header(header):
270
270
header .find ("7 days" ) > 0 ,
271
271
# exclude "NAAT positivity rate - last 7 days - ages <5"
272
272
header .find (" ages" ) < 0 ,
273
- ]) or all ([
273
+ ]) or (
274
274
# include "Confirmed COVID-19 admissions - last 7 days"
275
- header .startswith ("Confirmed COVID-19 admissions" ),
276
275
# exclude "Confirmed COVID-19 admissions - percent change"
277
- header .find ("7 days" ) > 0 ,
278
276
# exclude "Confirmed COVID-19 admissions - last 7 days - ages <18"
279
277
# exclude "Confirmed COVID-19 admissions - last 7 days - age unknown"
280
- header .find (" age" ) < 0 ,
281
278
# exclude "Confirmed COVID-19 admissions per 100 inpatient beds - last 7 days"
282
- header .find (" beds" ) < 0 ,
283
- ])) or (all ([
279
+ # exclude "Confirmed COVID-19 admissions per 100k - last 7 days"
280
+ header == "Confirmed COVID-19 admissions - last 7 days"
281
+ ) or all ([
284
282
# include "People who are fully vaccinated"
285
283
# include "People who have received a booster dose since August 13, 2021"
286
284
header .startswith ("People who" ),
@@ -292,13 +290,12 @@ def retain_header(header):
292
290
header .find (" age" ) < 0 ,
293
291
# exclude "People who are fully vaccinated - 12-17" ...
294
292
header .find ("-" ) < 0 ,
295
-
296
293
]) or all ([
297
- # include "People with full course administered"
298
- header .startswith ("People with full course" ),
299
- # exclude "People with full course administered as % of adult population"
300
- header .find ("%" ) < 0 ,
301
- ])))
294
+ # include "People with full course administered"
295
+ header .startswith ("People with full course" ),
296
+ # exclude "People with full course administered as % of adult population"
297
+ header .find ("%" ) < 0 ,
298
+ ])
302
299
def _parse_sheet (self , sheet ):
303
300
"""Extract data frame for this sheet."""
304
301
df = pd .read_excel (
0 commit comments