Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
- Importing Data 1:29
- Exploration Methods
- Review Exploration Methods 3 questions
- Selecting Data
- Review Selecting Data 2 questions
- Optional Challenge #1 - Top Referrers
- Manipulation 0:50
- Manipulation Techniques
- Review Manipulation Techniques 4 questions
- Optional Challenge #2 - Update Users
- Combining DataFrames 0:55
- Combining DataFrames
- Handling Duplicated and Missing Data
- Review Merging and Handling Missing Data 3 questions
- Manipulating Text
- Optional Challenge #3 - Verified Email List
- Grouping
- Review Text Manipulation and Grouping 2 questions
- Until Next Time 1:15
Instruction
Selecting Data
Selecting Data
A common need is to grab a subset of records that meet certain criteria. You can do this by indexing the DataFrame much like you've seen done with a NumPy.ndarray.
import os
import pandas as pd
users = pd.read_csv(os.path.join('data', 'users.csv'), index_col=0)
# Pop out a quick sanity check
len(users)
475
CashBox uses a referral system, everyone you refer will earn yo...