Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# import modules you need import pandas as pd import numpy as np Read in weather data 1) read in WeatherData.csv from csv 2) print
# import modules you need import pandas as pd import numpy as np
Read in weather data
1) read in WeatherData.csv from csv
2) print first 5 rows of weather data
3) print column and row dimensions of the weather data
4) slice data - save only the date (DATE) and the amount of precipitation (PRCP) to a new dataframe
5) write dataframe to csv file names lab3a.csv
A B D E F H J 1 STATION NAME DATE AWND AWND AT PRCP PRCP ATT SNOW SNOW_AT SNWD 2 USW0001: WASHING 1/1/2017 4.25 ,,W 0,,W,2400 0 ,,W,2400 3 USW0001: WASHING 1/2/2017 7.83 ,W 0.35 ,,W,2400 0 ,,W,2400 4. USW0001: WASHING 1/3/2017 5.82 ,,W 0.86 ,,W,2400 0,,W,2400 5 USW0001: WASHING 1/4/2017 9.84 ,,W OT,W,2400 o W,2400 6 USW0001: WASHING 1/5/2017 6.49 W OT,,W,2400 OT,,W,2400 7 USW0001: WASHING 1/6/2017 12.3 ,,W 0 T,W,2400 OT,,W,2400 8 USW0001: WASHING 1/7/2017 14.76 ,,W 0.01 ,,W,2400 0.4 ,,W,2400 9 USW0001: WASHING 1/8/2017 14.32 W 0 W 2400 0 W 2400 K SNWD_AT 0 ,,W,2400 0,W,2400 0,W,2400 0 ,,W,2400 0,W,2400 0 ,,W,2400 0,,W,2400 OTW 2400Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started