Skip to content

Commit

Permalink
Merge pull request #65 from lac-analytics/fix-update12
Browse files Browse the repository at this point in the history
Fixes empty gdf in 12 update script
  • Loading branch information
dlopezvsrmos authored Jul 23, 2021
2 parents efc9496 + 004a63d commit da5108b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions scripts/12-update-plumelab-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,17 @@ def main():
gdf_aq['sensor_id'] = s

gdf_all = gdf_all.append(gdf_aq)

if len(gdf_all) > 0:
gdf_all.drop_duplicates(inplace=True)

gdf_all.drop_duplicates(inplace=True)

gdf_all['date'] = gdf_all['date'].astype('int')
gdf_all['date'] = gdf_all['date'].astype('int')

aqiGDL.log('Done with download')
aqiGDL.gdf_to_db(gdf_all, 'plumbe',
schema='public', if_exists='append')

aqiGDL.log('Data in DB')
aqiGDL.log('Done with download')
aqiGDL.gdf_to_db(gdf_all, 'plumbe',
schema='public', if_exists='append')
aqiGDL.log('Data in DB')


if __name__ == "__main__":
Expand Down

0 comments on commit da5108b

Please sign in to comment.