<jupyter_start><jupyter_text>Ex1 - Filtering and Sorting Data This time we are going to pull data directly from the internet.Special thanks to: https://github.com/justmarkham for sharing the dataset and materials. Step 1. Import the necessary libraries<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/justmarkham/DAT8/master/data/chipotle.tsv).   Step 3. Assign it to a variable called chipo.<jupyter_code>datapath = r'https://raw.githubusercontent.com/justmarkham/DAT8/master/data/chipotle.tsv'
chipo = pd.read_csv(datapath,sep='\t')
chipo.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 4622 entries, 0 to 4621
Data columns (total 5 columns):
order_id              4622 non-null int64
quantity              4622 non-null int64
item_name             4622 non-null object
choice_description    3376 non-null object
item_price            4622 non-null object
dtypes: int64(2), object(3)
memory usage: 180.6+ KB<jupyter_text>Step 4. How many products cost more than $10.00?<jupyter_code>chipo['item_price_no'] = chipo.item_price.apply(lambda x: float(x.lstrip('$')))
chipo[chipo['item_price_no'] > 10].shape[0]<jupyter_output><empty_output><jupyter_text>Step 5. What is the price of each item?  print a data frame with only two columns item_name and item_price<jupyter_code><jupyter_output><empty_output><jupyter_text>Step 6. Sort by the name of the item<jupyter_code><jupyter_output><empty_output><jupyter_text>Step 7. What was the quantity of the most expensive item ordered?<jupyter_code><jupyter_output><empty_output><jupyter_text>Step 8. How many times were a Veggie Salad Bowl ordered?<jupyter_code><jupyter_output><empty_output><jupyter_text>Step 9. How many times people orderd more than one Canned Soda?<jupyter_code><jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup