เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

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 r and columns ending with location and save the new DataFrame as reviews_locations.
  • Sort reviews_locations in place using the rating column 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))
แก้ไขและรันโค้ด