Skip to content

Commit

Permalink
Update pipeline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JMiltner97 committed Jan 10, 2024
1 parent 387b59a commit 7238f87
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions project/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
except UnicodeDecodeError:
df = pd.read_csv(datasource1, sep=";", encoding='cp1252', on_bad_lines='skip', engine='python', header=None, names=column_names, skiprows=9, skipfooter=4)
df.to_sql(name="straße", con=engine, if_exists="replace", index=False)
print(df.head())

#read in datasource2
column_names = ['Year','Beförderte Güter','Veränderung zum Vorjahr BefGü','Beförderungsleistung','Veränderung zum Vorjahr BefLst']
Expand All @@ -38,10 +37,8 @@
df = pd.read_csv(datasource2, sep=";", encoding='cp1252', on_bad_lines='skip', engine='python', header=None, names=column_names, skiprows=7, skipfooter=3,)

df.to_sql(name="eisenbahn", con=engine, if_exists="replace", index=False)
print(df.head())

#read in datasource3
gdf = gpd.read_file(datasource3)
gdf.drop('geometry', axis=1, inplace=True)
gdf.to_sql(name="baustellen", con=engine, if_exists="replace", index=False)
print(gdf.head())

0 comments on commit 7238f87

Please sign in to comment.