Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 35
Image: ubuntu2004
Kernel: Python 3 (system-wide)
import pandas as pd
df = pd.read_excel('SampleData.xlsx')
df.head()
df_central = df[df['Region'] == 'Central']

The line above groups only the data that are located in the Central region.

df_central.groupby(by = "Item").sum()

The line above shows us the unit cost and total of all the items in the Central region. So the total number of Binders sold were 5,762.