Skip to content

Commit e3f48e2

Browse files
lpozoclaude
andcommitted
Drop the largest-orders cell
The tutorial no longer walks through nlargest, so remove it from the script and the notebook. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent e2156f6 commit e3f48e2

2 files changed

Lines changed: 18 additions & 43 deletions

File tree

positron-ide/notebooks/explore_sales.ipynb

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "4c1e042e",
5+
"id": "b2641d4c",
66
"metadata": {},
77
"source": [
88
"# Explore Sales Orders\n",
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "markdown",
15-
"id": "8ae0382c",
15+
"id": "92d9e9b6",
1616
"metadata": {},
1717
"source": [
1818
"## Load the Raw Data\n",
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "25d214b8",
26+
"id": "e9a1c254",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -42,7 +42,7 @@
4242
},
4343
{
4444
"cell_type": "markdown",
45-
"id": "a470ad43",
45+
"id": "708e7591",
4646
"metadata": {},
4747
"source": [
4848
"## Check Data Quality\n",
@@ -53,7 +53,7 @@
5353
{
5454
"cell_type": "code",
5555
"execution_count": null,
56-
"id": "bb49f812",
56+
"id": "fbc5d423",
5757
"metadata": {},
5858
"outputs": [],
5959
"source": [
@@ -68,28 +68,7 @@
6868
},
6969
{
7070
"cell_type": "markdown",
71-
"id": "efafe93e",
72-
"metadata": {},
73-
"source": [
74-
"## Inspect the Largest Orders\n",
75-
"\n",
76-
"List the five highest sale prices to see what the top of the range looks like."
77-
]
78-
},
79-
{
80-
"cell_type": "code",
81-
"execution_count": null,
82-
"id": "6fef73d5",
83-
"metadata": {},
84-
"outputs": [],
85-
"source": [
86-
"columns = [\"order_type\", \"quantity\", \"unit_price\", \"sale_price\"]\n",
87-
"print(sales.nlargest(5, \"sale_price\")[columns].to_string(index=False))"
88-
]
89-
},
90-
{
91-
"cell_type": "markdown",
92-
"id": "2b3f369d",
71+
"id": "81fdf76e",
9372
"metadata": {},
9473
"source": [
9574
"## Clean the Data\n",
@@ -100,7 +79,7 @@
10079
{
10180
"cell_type": "code",
10281
"execution_count": null,
103-
"id": "19acc30c",
82+
"id": "4be9da3c",
10483
"metadata": {},
10584
"outputs": [],
10685
"source": [
@@ -115,7 +94,7 @@
11594
},
11695
{
11796
"cell_type": "markdown",
118-
"id": "59e0cee4",
97+
"id": "d6bc4409",
11998
"metadata": {},
12099
"source": [
121100
"## Verify the Totals\n",
@@ -126,7 +105,7 @@
126105
{
127106
"cell_type": "code",
128107
"execution_count": null,
129-
"id": "5dd5fe37",
108+
"id": "ce17885f",
130109
"metadata": {},
131110
"outputs": [],
132111
"source": [
@@ -137,7 +116,7 @@
137116
},
138117
{
139118
"cell_type": "markdown",
140-
"id": "b245ddc1",
119+
"id": "1aead3f7",
141120
"metadata": {},
142121
"source": [
143122
"## Describe the Data\n",
@@ -148,7 +127,7 @@
148127
{
149128
"cell_type": "code",
150129
"execution_count": null,
151-
"id": "41aa6fb0",
130+
"id": "91aa9d71",
152131
"metadata": {},
153132
"outputs": [],
154133
"source": [
@@ -160,7 +139,7 @@
160139
},
161140
{
162141
"cell_type": "markdown",
163-
"id": "891db419",
142+
"id": "103777e1",
164143
"metadata": {},
165144
"source": [
166145
"## Compare Typical Orders\n",
@@ -171,7 +150,7 @@
171150
{
172151
"cell_type": "code",
173152
"execution_count": null,
174-
"id": "25aa795d",
153+
"id": "85b34fca",
175154
"metadata": {},
176155
"outputs": [],
177156
"source": [
@@ -188,7 +167,7 @@
188167
},
189168
{
190169
"cell_type": "markdown",
191-
"id": "1a5f5657",
170+
"id": "61b5d1d8",
192171
"metadata": {},
193172
"source": [
194173
"## Visualize the Comparison\n",
@@ -199,7 +178,7 @@
199178
{
200179
"cell_type": "code",
201180
"execution_count": null,
202-
"id": "a604d65d",
181+
"id": "9e3851b8",
203182
"metadata": {},
204183
"outputs": [],
205184
"source": [
@@ -217,7 +196,7 @@
217196
},
218197
{
219198
"cell_type": "markdown",
220-
"id": "220350eb",
199+
"id": "e0bd88e9",
221200
"metadata": {},
222201
"source": [
223202
"## Add an Interactive Chart\n",
@@ -228,7 +207,7 @@
228207
{
229208
"cell_type": "code",
230209
"execution_count": null,
231-
"id": "a856547e",
210+
"id": "eb9b26c0",
232211
"metadata": {},
233212
"outputs": [],
234213
"source": [
@@ -249,7 +228,7 @@
249228
},
250229
{
251230
"cell_type": "markdown",
252-
"id": "dc5e8033",
231+
"id": "7fcde02e",
253232
"metadata": {},
254233
"source": [
255234
"## Optional Assistant Follow-Up\n",

positron-ide/src/prepare_sales.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
print("Repeated order numbers:", sales["order_number"].duplicated().sum())
1717
print(sales.dtypes)
1818

19-
# %%
20-
columns = ["order_type", "quantity", "unit_price", "sale_price"]
21-
print(sales.nlargest(5, "sale_price")[columns].to_string(index=False))
22-
2319
# %%
2420
clean_sales = sales.rename(columns={"produce_name": "product_name"}).copy()
2521
clean_sales["order_date"] = pd.to_datetime(

0 commit comments

Comments
 (0)