Created
November 1, 2018 15:38
-
-
Save debonx/bddedc822e9d3376ae3b334b90ab8b46 to your computer and use it in GitHub Desktop.
Using Pandas library example. More at https://pandas.pydata.org/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
#Read CSV file | |
orders = pd.read_csv('shoefly.csv') | |
#Inspect first 5 lines | |
print(orders.head(5)) | |
#Get a specific serie of data / column | |
emails = orders['email'] | |
#select a specific order by colum | |
frances_palmer = orders[(orders.first_name == 'Frances') & (orders.last_name == 'Palmer')] | |
#select a specific order by value | |
comfy_shoes = orders[orders.shoe_type.isin(['clogs', 'boots', 'ballet flats'])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment