diff --git a/backend/api/services/icbc_upload.py b/backend/api/services/icbc_upload.py index fdc9439f4..d3b009411 100644 --- a/backend/api/services/icbc_upload.py +++ b/backend/api/services/icbc_upload.py @@ -57,18 +57,17 @@ def ingest_icbc_spreadsheet(excelfile, requesting_user, dateCurrentTo): df.query('MODEL_YEAR > 2018', inplace=True) # df = df[(df.MODEL_YEAR > 2018)] - df.query('MODEL_YEAR > 2018', inplace=True) - df.query('HYBRID_VEHICLE_FLAG != "N"', inplace=True) - df.query('ELECTRIC_VEHICLE_FLAG != "N"', inplace=True) - df['FUEL_TYPE'] = df['FUEL_TYPE'].str.upper() - df.query('FUEL_TYPE in ["ELECTRIC", "HYDROGEN", "GASOLINEELECTRIC"]') - # df = df[ - # (df.HYBRID_VEHICLE_FLAG != 'N') | - # (df.ELECTRIC_VEHICLE_FLAG != 'N') | - # (df.FUEL_TYPE.str.upper() == 'ELECTRIC') | - # (df.FUEL_TYPE.str.upper() == 'HYDROGEN') | - # (df.FUEL_TYPE.str.upper() == 'GASOLINEELECTRIC') - # ] + # df.query('HYBRID_VEHICLE_FLAG != "N"', inplace=True) + # df.query('ELECTRIC_VEHICLE_FLAG != "N"', inplace=True) + # df['FUEL_TYPE'] = df['FUEL_TYPE'].str.upper() + # df.query('FUEL_TYPE in ["ELECTRIC", "HYDROGEN", "GASOLINEELECTRIC"]') + df = df[ + (df.HYBRID_VEHICLE_FLAG != 'N') | + (df.ELECTRIC_VEHICLE_FLAG != 'N') | + (df.FUEL_TYPE.str.upper() == 'ELECTRIC') | + (df.FUEL_TYPE.str.upper() == 'HYDROGEN') | + (df.FUEL_TYPE.str.upper() == 'GASOLINEELECTRIC') + ] df.query('VIN != 0') # df = df[(df.VIN != 0)]