1/21
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Complete the code that returns all businesses whose name contains "Tea". business.____("Business", ____.____("Tea"))
where, are, containing
Complete the code that returns shows with:
a rating of at least 8
at least 6 seasons
tv_shows.____(
"Rating", ____.____(8)
).____(
"# of Seasons", ____.____(6)
)where, are, above_or_equal_to, where, are, above_or_equal_to
Complete the expression that returns only "Business" and "Minutes" for businesses in "Southside" at least 11 minutes away:
business.____(
"Neighborhood", "Southside"
).____(
"Minutes", ____.____(11)
).____(
"Business", "Minutes"
)
where, where, are, above_or_equal_to, select
Complete the code that determines how many seasons the highest-rated show has:
tv_shows.____(
"Rating", ____=____
).____(
"# of Seasons"
).____(0)
sort, descending, True, column, item
Complete the code that returns a table containing the 5 highest-rated shows:
shows.____(
"Rating", ____=____
).____(
________(5)
)
sort, descending, True, take, np.arange
Complete the code that returns an array containing the names of the 5 highest-rated shows:
shows.____("Rating", ____=____).____(________(5)).____("Name")sort, descending, True, take, np.arange, column
def is_nearby(minutes):
return minutes <= 12Complete the code that applies this function to every business:
business.____(
____, "Minutes"
)
apply, is_nearby
Given:
def end_year(premiere_year, num_seasons):
return premiere_year + num_seasons
Complete:
tv_shows.____(
____,
"Premiere Year",
"# of Seasons"
)apply, end_year
Complete the code that calculates the average satisfaction of "Sweet" pastries:
________(
pastries.____(
"category", "Sweet"
).____(
"satisfaction"
)
)
np.average, where, column
Complete the expression that calculates satisfaction ÷ price for every pastry:
pastries.____("satisfaction") / pastries.____("price")
column, column
You already created the array score_array. Complete the code that adds it to pastries under the column name "satisfaction per $":
pastries = pastries.____(
"satisfaction per $", ____
)
with_column, score_array
Given: def score(satisfaction, price):
return satisfaction / price
Complete the expression that calculates a score for every pastry:
pastries.____(
____,
"satisfaction",
"price"
)
apply, score
Complete the code that returns an array of the item names of the 3 pastries with the highest "satisfaction per $":
pastries.____(
"satisfaction per $", ____=____
).____(
____.____(3)
).____(
"item"
)
sort, descending, True, take, np, arange, column
Complete the code that finds the average age for each player position:
players.____(
"Position", "Age"
).____(
"Position", ____.____
)
select, group, np average
Complete the code to find the 5 non-highway intersections with the most crashes:
no_highway = berkeley.____(
"Highway", False
).____(
make_array("Road 1", "Road 2")
)
top_five = no_highway.____(
"count", ____=____
).____(
________(5)
)
where, group, sort, descending, True, take, np.arange
Complete the code to compare crash counts by "Time" for each "Day of Week":
berkeley.pivot(
"Time", "Day of Week"
).____(
"Day of Week"
)
barh
Complete the code that plots the average Project and Final scores for each enrollment week:
scores.____(
"Enrolled", ____.____
).____(
"Enrolled"
)
group, np, average, barh
Complete the code that visualizes the distribution of "Homeless per 10,000":
fifty_states.____(
"Homeless per 10,000"
)
hist
Complete the function that converts "Minutes" and "Seconds" from a row into total seconds:
def total_seconds(row):
return 60 * row.____("Minutes") + row.____("Seconds")
item, item
Complete the code so the resulting array is: 3, 5, 7, 9
np.arange(____, ____, ____)
3, 11, 2
Complete the expression that returns the first 4 rows of restaurants:
restaurants.____(
________(4)
)
take, np.arange
Complete the code that returns an array containing the names of the 3 highest-rated restaurants in "Downtown":
restaurants.____(
"Neighborhood", "Downtown"
).____(
"Rating", ____=____
).____(
________(3)
).____(
"Name"
)
where, sort, descending, True, take, np.arange, column