Skip to content

Instantly share code, notes, and snippets.

Created Jun 19, 2016
What would you like to do?
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.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