Skip to content

Commit 07a4685

Browse files
committed
corrections to open lab exercises
PYOL4, answer key used paintings instead of photos dataset
1 parent 6de2e94 commit 07a4685

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Open_Lab_4_exploratory_analysis_with_pandas/Open_Lab_4_exploratory_analysis_with_pandas.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
"source": [
356356
"### Exercise 3: Grouping Values\n",
357357
"\n",
358-
"Find the average year created for each department (Painting & Sculpture, Drawings & Prints, Film, Fluxus Collection, Media & Performance). Group the data using 'Department,' then show a table with the average 'YearCreated' for each department, sorted from oldest to newest.\n",
358+
"Find the average year created for each department (Painting & Sculpture, Drawings & Prints, Film, Fluxus Collection, Media & Performance) in the photos collection. Group the data using 'Department,' then show a table with the average 'YearCreated' for each department, sorted from oldest to newest.\n",
359359
"\n",
360360
"> Bonus discussion question: does showing the data this way tell the whole story? What other factors could affect the average year the art was created?"
361361
]
@@ -373,7 +373,7 @@
373373
"source": [
374374
"### Exercise 4: Group values by two factors\n",
375375
"\n",
376-
"Find how many works of art each artist created using different mediums. Group by artist and medium to create a chart that shows how many works of art in the collection by each artist used each medium."
376+
"Find how many works of art each artist created using different mediums. Group by artist and medium to create a chart that shows how many works of art in the photos collection by each artist used each medium."
377377
]
378378
},
379379
{

Open_Lab_4_exploratory_analysis_with_pandas/filled_Open_Lab_4_exploratory_analysis_with_pandas.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3379,7 +3379,7 @@
33793379
"source": [
33803380
"### Exercise 3: Grouping Values\n",
33813381
"\n",
3382-
"Find the average year created for each department (Painting & Sculpture, Drawings & Prints, Film, Fluxus Collection, Media & Performance). Group the data using 'Department,' then show a table with the average 'YearCreated' for each department, sorted from oldest to newest.\n",
3382+
"Find the average year created for each department (Painting & Sculpture, Drawings & Prints, Film, Fluxus Collection, Media & Performance) in the photos collection. Group the data using 'Department,' then show a table with the average 'YearCreated' for each department, sorted from oldest to newest.\n",
33833383
"\n",
33843384
"> Bonus discussion question: does showing the data this way tell the whole story? What other factors could affect the average year the art was created?"
33853385
]
@@ -3581,7 +3581,7 @@
35813581
],
35823582
"source": [
35833583
"# Create the groupby object and store in a variable\n",
3584-
"departments = paintings.groupby('Department')\n",
3584+
"departments = photos.groupby('Department')\n",
35853585
"\n",
35863586
"# Find the mean of each group and sort values by YearCreated\n",
35873587
"departments.mean().sort_values('YearCreated', ascending=True)"
@@ -3593,7 +3593,7 @@
35933593
"source": [
35943594
"### Exercise 4: Group values by two factors\n",
35953595
"\n",
3596-
"Find how many works of art each artist created using different mediums. Group by artist and medium to create a chart that shows how many works of art in the collection by each artist used each medium. "
3596+
"Find how many works of art each artist created using different mediums. Group by artist and medium to create a chart that shows how many works of art in the photos collection by each artist used each medium. "
35973597
]
35983598
},
35993599
{
@@ -3626,10 +3626,10 @@
36263626
],
36273627
"source": [
36283628
"# Create the groupby object and store in a variable\n",
3629-
"test = paintings.groupby(['Artist', 'Medium'])\n",
3629+
"test = photos.groupby(['Artist', 'Medium'])\n",
36303630
"\n",
36313631
"# Find the mean of each group and sort values by YearCreated\n",
3632-
"test.size()"
3632+
"test.mean().sort_values('YearCreated', ascending= False)"
36333633
]
36343634
},
36353635
{

0 commit comments

Comments
 (0)