Category: Live updates

Examining the dataset

Throughout this course, you’ll be analyzing a dataset of traffic stops in Rhode Island that was collected by the Stanford Open Policing Project. Before beginning your analysis, it’s important that you familiarize yourself with the dataset. In this exercise, you’ll read the dataset into pandas, examine the first few rows,...

Exploratory Data Analysis in Python

1: Exploring the NSFG data To get the number of rows and columns in a DataFrame, you can read its shapeattribute. To get the column names, you can read the columns attribute. The result is an Index, which is a Pandas data structure that is similar to a list. Let’s begin exploring...

Writing Functions In Python

Crafting a docstring You’ve decided to write the world’s greatest open-source natural language processing Python package. It will revolutionize working with free-form text, the way numpy did for arrays, pandas did for tabular data, and scikit-learn did for machine learning. The first function you write is count_letter(). It takes a string and a single letter and...

Working with dates and times in python

Which day of the week? Hurricane Andrew, which hit Florida on August 24, 1992, was one of the costliest and deadliest hurricanes in US history. Which day of the week did it make landfall? Let’s walk through all of the steps to figure this out. How many hurricanes come...

Intermediate Importing Data in Python

Importing flat files from the web: your turn! You are about to import your first file from the web! The flat file you will import will be 'winequality-red.csv' from the University of California, Irvine’s Machine Learning repository. The flat file contains tabular data of physiochemical properties of red wine, such as pH,...

Introduction to Importing Data in Python

In this chapter, you’ll learn how to import data into Python from all types of flat files, which are a simple and prevalent form of data storage. You’ve previously learned how to use NumPy and pandas—you will learn how to use these packages to import flat files and customize...