Extra Practice Session 3_ Data Visualizations, Functions, and Applying
pdf
keyboard_arrow_up
School
University of California, San Diego *
*We aren’t endorsed by this school
Course
10
Subject
Mathematics
Date
Feb 20, 2024
Type
Pages
14
Uploaded by BaronJackal4036
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
1/14
items
"Item" (str)
"Cost" (int)
"Location" (str)
items
items
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
2/14
"Location"
items
restaurants
restaurants
'name'
'year'
'month'
'day'
'num_diners'
'income'
'name'
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
3/14
sungod
'Year'
int
'Artist'
str
'Appearance_Order'
int
import babypandas as bpd
import numpy as np
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
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
4/14
prices
'broccoli'
'ice_cream'
(
sungod.take(np.arange(
5
))
.plot(kind
=
'hist'
, density
=
True
, bins
=
np.arange(
0
, 7
, 2
), y
=
'Appearance_Order'
)
;
)
prices.plot(kind
=
'hist'
, y
=
'broccoli'
, bins
=
np.arange(
0.8
, 2.11
, 0.1
), density
=
True
)
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
5/14
[$1.10, $1.50)
prices.plot(kind
=
'hist'
, y
=
'broccoli'
, bins
=
[
0.8
, 1
, 1.1
, 1.5
, 1.8
, 1.9
, 2.5
], density
=
True
)
prices.get([
'broccoli'
, 'ice_cream'
]).plot(kind
=
'barh'
)
prices.get([
'broccoli'
, 'ice_cream'
]).plot(kind
=
'hist'
)
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
6/14
fingerprints
(prices.get([
'broccoli'
, 'ice_cream'
]).plot(kind
=
'scatter'
, x
=
'broccoli'
, y
=
'ice_cream'
))
fingerprints.plot(kind
=
'scatter'
, x
=
'x'
, y
=
'y'
)
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
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
7/14
fingerprints.plot(kind
=
'hist'
, y
=
'x'
,
density
=
True
,
bins
=
np.arange(
0
, 8
, 2
))
fingerprints.plot(kind
=
'hist'
, y
=
'y'
,
density
=
True
,
bins
=
np.arange(
0
, 8
, 2
))
fingerprints.plot(kind
=
'hist'
, y
=
'x'
,
density
=
True
,
bins
=
np.arange(
0
, 8
, 2
))
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
8/14
h
h
20 ⋅
h
100 ⋅
h
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
9/14
200 ⋅
h
400 ⋅
h
800 ⋅
h
h
h
20 ⋅
h
100 ⋅
h
200 ⋅
h
400 ⋅
h
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
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
10/14
evs
"Brand"
"Model"
"BodyStyle"
"Seats"
"TopSpeed"
"Range"
evs
evs
import babypandas as bpd
import numpy as np
"Range"
800 ⋅
h
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
11/14
"Range"
"Brand"
"Range"
"Brand"
"Range"
"Brand"
"TopSpeed"
"Range"
v
len(v)
v
v.shape[0]
s
max(s)
first
x
y
first = evs.get(
"Brand"
).
apply
(
max
) second = evs.get(
"Brand"
).
max
()
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
12/14
second
.apply
ikea
'product'
ikea
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
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
13/14
extract_product_line
extract_product_line
to_minutes
'x hr, y min'
x
y
int
to_minutes('3 hr, 5 min')
(ikea.assign(product_line = ikea.get(
'product'
)
.
apply
(extract_product_line)))
def
extract_product_line(x):
return
_________
def
to_minutes(time):
first_split = time.split(
' hr, '
)
second_split = first_split[
1
].split(
' min'
)
return
_________
24. 1. 26. 오전
10:45
Extra Practice Session 3: Data Visualizations, Functions, and Applying
https://practice.dsc10.com/probset03/index.html
14/14