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

Plotting violations by district

Now that you've created a frequency table focused on the "K" zones, you'll visualize the data to help you compare what violations are being caught in each zone.

First you'll create a bar plot, which is an appropriate plot type since you're comparing categorical data. Then you'll create a stacked bar plot in order to get a slightly different look at the data. Which plot do you find to be more insightful?

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Analyzing Police Activity with pandas

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Create a bar plot of 'k_zones'


# Display the plot
แก้ไขและรันโค้ด