Loved by learners at thousands of companies
Now that you have learned the foundations of pandas, this course will give you the chance to apply that knowledge by answering interesting questions about a real dataset! You will explore the Stanford Open Policing Project dataset and analyze the impact of gender on police behavior. During the course, you will gain more practice cleaning messy data, creating visualizations, combining and reshaping datasets, and manipulating time series data. Analyzing Police Activity with pandas will give you valuable experience analyzing a dataset from start to finish, preparing you for your data science career!
Preparing the data for analysisFree
Before beginning your analysis, it is critical that you first examine and clean the dataset, to make working with it a more efficient process. In this chapter, you will practice fixing data types, handling missing values, and dropping columns and rows while learning about the Stanford Open Policing Project dataset.
Exploring the relationship between gender and policing
Does the gender of a driver have an impact on police behavior during a traffic stop? In this chapter, you will explore that question while practicing filtering, grouping, method chaining, Boolean math, string methods, and more!Do the genders commit different violations?50 xpExamining traffic violations100 xpComparing violations by gender100 xpDoes gender affect who gets a ticket for speeding?50 xpFiltering by multiple conditions50 xpComparing speeding outcomes by gender100 xpDoes gender affect whose vehicle is searched?50 xpCalculating the search rate100 xpComparing search rates by gender100 xpAdding a second factor to the analysis100 xpDoes gender affect who is frisked during a search?50 xpCounting protective frisks100 xpComparing frisk rates by gender100 xp
Visual exploratory data analysis
Are you more likely to get arrested at a certain time of day? Are drug-related stops on the rise? In this chapter, you will answer these and other questions by analyzing the dataset visually, since plots can help you to understand trends in a way that examining the raw data cannot.Does time of day affect arrest rate?50 xpCalculating the hourly arrest rate100 xpPlotting the hourly arrest rate100 xpAre drug-related stops on the rise?50 xpPlotting drug-related stops100 xpComparing drug and search rates100 xpWhat violations are caught in each district?50 xpTallying violations by district100 xpPlotting violations by district100 xpHow long might you be stopped for a violation?50 xpConverting stop durations to numbers100 xpPlotting stop length100 xp
Analyzing the effect of weather on policing
In this chapter, you will use a second dataset to explore the impact of weather conditions on police behavior during traffic stops. You will practice merging and reshaping datasets, assessing whether a data source is trustworthy, working with categorical data, and other advanced skills.Exploring the weather dataset50 xpPlotting the temperature100 xpPlotting the temperature difference100 xpCategorizing the weather50 xpCounting bad weather conditions100 xpRating the weather conditions100 xpChanging the data type to category100 xpMerging datasets50 xpPreparing the DataFrames100 xpMerging the DataFrames100 xpDoes weather affect the arrest rate?50 xpComparing arrest rates by weather rating100 xpSelecting from a multi-indexed Series100 xpReshaping the arrest rate data100 xpConclusion50 xp
PrerequisitesJoining Data with pandas
Kevin MarkhamSee More
Founder of Data School
Kevin is the founder of Data School, an online school for learning data science with Python. He is passionate about teaching people who are new to the field, regardless of their educational and professional backgrounds. Currently, he teaches machine learning and data analysis to over 10,000 students each month through the Data School YouTube channel. He has a degree in Computer Engineering from Vanderbilt University.
Don’t just take our word for it
- Martin B.about 7 hours
Exceptional guidance! He explained stuff so well, it was among the best 5 datacamp courses I ever attended.
- Rob A.6 months
Everything is super
- Allan M.6 months
It is a good course.
- Viraj N.6 months
- Felipe M.6 months
Good review of all the previous courses