Winter 2023 Midterm Exam

.pdf

School

University of California, San Diego *

*We aren’t endorsed by this school

Course

10

Subject

Geography

Date

Apr 3, 2024

Type

pdf

Pages

16

Uploaded by BaronJackal4036

24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 1/16 storms storms "Name" str "Date" int 20151113 "Time" str "Status" str "TD" "TS" "Latitude" str "Longitude" str
24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 2/16 storms storms import babypandas as bpd import numpy as np 'Name' 'Date' 'Time' 'Latitude' "Date" int 19500812 get month int get month 19500812
24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 3/16 get year get day int int date / 10000 int(date / 10000) int(date % 10000) int((date % 10000) / 10000) int(date / 100) int(date / 1000000) int((date % 100) / 10000) date % 100 def get_month(date): return int((date % 10000 ) / 100 ) def get_year(date): return ____(a)____ def get_day(date): return ____(b)____ storms = storms.assign(Year = storms.get( "Date" ).apply(get_year), Month = storms.get( "Date" ).apply(get_month), Day = storms.get( "Date" ).apply(get_day))
24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 4/16 storms amelia amelia = (storms[(storms.get( "Name" ) == "AMELIA" ) & (storms.get( "Year" ) == 1978 )] .get([ "Year" , "Month" , "Day" , "Time" , "Status" , "Latitude" , "Longitude" ])) amelia.groupby( "Status" ).max()
24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 5/16 n storms storms 'Duration' int 'Duration' storms_by_duration n storms_by_duration n storms_by_duration storms_by_duration len(storms_by_duration.take(np.arange(n)).get("Name").unique()) n
24. 2. 12. 오전 8:17 Winter 2023 Midterm Exam https://practice.dsc10.com/wi23-midterm/index.html 6/16 "Latitude" storms "N" "Longitude" "W" "N" "W" lat_long_numerical "Latitude" "Longitude" storms float lat_long_numerical(34.1N) 34.1 .strip() "www.dsc10.com".strip("cmowz.") "dsc10" .strip() lat_long_numerical 'Latitude' 'Longitude' float def lat_long_numerical(lat_long): return ________
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help