CoCalc Public FilesMakeupWork / Done / 5-12Discussion.ipynbOpen with one click!
Author: Kaleb Cruz
Views : 60
Compute Environment: Ubuntu 20.04 (Default)

Using the SampleData.xlsx and determine the number of binders sold in the Central region.

In [32]:
import pandas as pd
In [33]:
df = pd.read_excel('SampleData.xlsx')
In [34]:
df_Central = df[(df['Region']=='Central') & (df['Item']=='Binder')]
In [37]:
df_Central
OrderDate Region Rep Item Units Unit Cost Total
1 2016-01-23 Central Kivell Binder 50 19.99 999.50
16 2016-10-05 Central Morgan Binder 28 8.99 251.72
22 2017-01-15 Central Gill Binder 46 8.99 413.54
23 2017-02-01 Central Smith Binder 87 15.00 1305.00
30 2017-05-31 Central Gill Binder 80 8.99 719.20
40 2017-11-17 Central Jardine Binder 11 4.99 54.89
41 2017-12-04 Central Jardine Binder 94 19.99 1879.06
42 2017-12-21 Central Andrews Binder 28 4.99 139.72
In [38]:
df_Central['Units'].sum()
424
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: