Skip to content

Commit

Permalink
output to a new csv file
Browse files Browse the repository at this point in the history
  • Loading branch information
zizi2z committed Feb 16, 2024
1 parent de0f0df commit 970c38b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions recitation-5/joined_dataframe.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
date,temp,precipitation,station_id,lat,lng,name,sensor name,manufacturer
2021-02-16,75,0.1,1,32,81,"Savannah, GA station",Weathermatic,ACME
2021-02-16,-10,0.0,2,46,92,"Duluth, MN station",MyTemp,ACME
2021-02-17,65,0.0,1,9,79,"Panama City, Panama station",SensiWeather,Westinghouse
3 changes: 2 additions & 1 deletion recitation-5/practice.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
df2_indexed = df2.set_index('id') # sensors
all_inner_joined = df1_df4_inner_joined.join(df2_indexed, how='inner') #inner joins


# write this to a csv file
all_inner_joined.to_csv('joined_dataframe.csv', index=False)

0 comments on commit 970c38b

Please sign in to comment.