Selecting patterns
Switzerland, Belgium, Ecuador, … these countries and many more are associated with the best chocolate. But does our dataset agree? Let's look at the columns containing information regarding reviews and location!
The DataFrames package and the chocolates dataset have been loaded for you.
本练习是课程的一部分
Data Manipulation in Julia
练习说明
- Select columns starting with the letter
rand columns ending withlocationand save the new DataFrame asreviews_locations. - Sort
reviews_locationsin place using theratingcolumn in descending order.
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Select columns starting with r and columns ending with location
reviews_locations = ____(____, ____, ____)
# Sort reviews_locations using the rating column
____(____, ____, rev = true)
println(first(reviews_locations, 5))