Created
June 19, 2016 17:21
-
-
Save zrhans/519acb269cc68cf1184328d41625f123 to your computer and use it in GitHub Desktop.
This file contains 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 | |
sales = [('account', ['Jones LLC', 'Alpha Co', 'Blue Inc', 'Mega Corp']), | |
('Total Sales', [150, 200, 75, 300]), | |
('Country', ['US', 'UK', 'US', 'US'])] | |
df = pd.DataFrame.from_items(sales) | |
indices = [True, False, True, True] | |
df[indices] | |
df.Country == 'US' | |
# Faz o mesmo filtro no dataframe df | |
df[df["Country"] == 'US'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment