Skip to content

Commit 5867f6f

Browse files
committed
Correct mistake on Step11 of exercise World Food Facts
1 parent 496cdb6 commit 5867f6f

File tree

3 files changed

+66
-47
lines changed

3 files changed

+66
-47
lines changed

01_Getting_&_Knowing_Your_Data/World Food Facts/Exercises.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"cell_type": "markdown",
154154
"metadata": {},
155155
"source": [
156-
"### Step 11. Give me the product name of the 19th observation."
156+
"### Step 11. What is the product name of the 19th observation?"
157157
]
158158
},
159159
{

01_Getting_&_Knowing_Your_Data/World Food Facts/Exercises_with_solutions.ipynb

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": 1,
26+
"execution_count": 3,
2727
"metadata": {
2828
"collapsed": true
2929
},
@@ -42,11 +42,20 @@
4242
},
4343
{
4444
"cell_type": "code",
45-
"execution_count": 8,
45+
"execution_count": 4,
4646
"metadata": {
4747
"collapsed": false
4848
},
49-
"outputs": [],
49+
"outputs": [
50+
{
51+
"name": "stderr",
52+
"output_type": "stream",
53+
"text": [
54+
"//anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2723: DtypeWarning: Columns (0,3,5,27,36) have mixed types. Specify dtype option on import or set low_memory=False.\n",
55+
" interactivity=interactivity, compiler=compiler, result=result)\n"
56+
]
57+
}
58+
],
5059
"source": [
5160
"food = pd.read_csv('/Users/guilhermeoliveira/Desktop/world-food-facts/FoodFacts.csv')"
5261
]
@@ -60,7 +69,7 @@
6069
},
6170
{
6271
"cell_type": "code",
63-
"execution_count": 9,
72+
"execution_count": 10,
6473
"metadata": {
6574
"collapsed": false
6675
},
@@ -275,7 +284,7 @@
275284
"[5 rows x 159 columns]"
276285
]
277286
},
278-
"execution_count": 9,
287+
"execution_count": 10,
279288
"metadata": {},
280289
"output_type": "execute_result"
281290
}
@@ -293,7 +302,7 @@
293302
},
294303
{
295304
"cell_type": "code",
296-
"execution_count": 49,
305+
"execution_count": 11,
297306
"metadata": {
298307
"collapsed": false
299308
},
@@ -304,14 +313,14 @@
304313
"65503"
305314
]
306315
},
307-
"execution_count": 49,
316+
"execution_count": 11,
308317
"metadata": {},
309318
"output_type": "execute_result"
310319
}
311320
],
312321
"source": [
313-
"food.shape #will give you both (observations / rows, columns)\n",
314-
"food.shape[0] #will give you only the observations number"
322+
"food.shape #will give you both (observations/rows, columns)\n",
323+
"food.shape[0] #will give you only the observations/rows number"
315324
]
316325
},
317326
{
@@ -323,7 +332,7 @@
323332
},
324333
{
325334
"cell_type": "code",
326-
"execution_count": 52,
335+
"execution_count": 12,
327336
"metadata": {
328337
"collapsed": false
329338
},
@@ -343,8 +352,8 @@
343352
}
344353
],
345354
"source": [
346-
"print food.shape #will give you both (observations / rows, columns)\n",
347-
"print food.shape[1] #will give you only the observations number\n",
355+
"print food.shape #will give you both (observations/rows, columns)\n",
356+
"print food.shape[1] #will give you only the columns number\n",
348357
"\n",
349358
"#OR\n",
350359
"\n",
@@ -360,7 +369,7 @@
360369
},
361370
{
362371
"cell_type": "code",
363-
"execution_count": 42,
372+
"execution_count": 13,
364373
"metadata": {
365374
"collapsed": false
366375
},
@@ -379,7 +388,7 @@
379388
" dtype='object', length=159)"
380389
]
381390
},
382-
"execution_count": 42,
391+
"execution_count": 13,
383392
"metadata": {},
384393
"output_type": "execute_result"
385394
}
@@ -397,7 +406,7 @@
397406
},
398407
{
399408
"cell_type": "code",
400-
"execution_count": 41,
409+
"execution_count": 14,
401410
"metadata": {
402411
"collapsed": false
403412
},
@@ -408,7 +417,7 @@
408417
"'glucose_100g'"
409418
]
410419
},
411-
"execution_count": 41,
420+
"execution_count": 14,
412421
"metadata": {},
413422
"output_type": "execute_result"
414423
}
@@ -426,7 +435,7 @@
426435
},
427436
{
428437
"cell_type": "code",
429-
"execution_count": 31,
438+
"execution_count": 15,
430439
"metadata": {
431440
"collapsed": false
432441
},
@@ -437,7 +446,7 @@
437446
"dtype('float64')"
438447
]
439448
},
440-
"execution_count": 31,
449+
"execution_count": 15,
441450
"metadata": {},
442451
"output_type": "execute_result"
443452
}
@@ -455,7 +464,7 @@
455464
},
456465
{
457466
"cell_type": "code",
458-
"execution_count": 32,
467+
"execution_count": 16,
459468
"metadata": {
460469
"collapsed": false
461470
},
@@ -466,7 +475,7 @@
466475
"RangeIndex(start=0, stop=65503, step=1)"
467476
]
468477
},
469-
"execution_count": 32,
478+
"execution_count": 16,
470479
"metadata": {},
471480
"output_type": "execute_result"
472481
}
@@ -479,23 +488,23 @@
479488
"cell_type": "markdown",
480489
"metadata": {},
481490
"source": [
482-
"### Step 11. Give me the product name of the 19th observation."
491+
"### Step 11. What is the product name of the 19th observation?"
483492
]
484493
},
485494
{
486495
"cell_type": "code",
487-
"execution_count": 40,
496+
"execution_count": 18,
488497
"metadata": {
489498
"collapsed": false
490499
},
491500
"outputs": [
492501
{
493502
"data": {
494503
"text/plain": [
495-
"'Sea Salt Potato Chips'"
504+
"'Flat Leaf Parsley'"
496505
]
497506
},
498-
"execution_count": 40,
507+
"execution_count": 18,
499508
"metadata": {},
500509
"output_type": "execute_result"
501510
}

01_Getting_&_Knowing_Your_Data/World Food Facts/Solutions.ipynb

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Getting and knowing your Data"
7+
"# Ex1 - Getting and knowing your Data"
88
]
99
},
1010
{
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": 1,
26+
"execution_count": 3,
2727
"metadata": {
2828
"collapsed": true
2929
},
@@ -39,11 +39,20 @@
3939
},
4040
{
4141
"cell_type": "code",
42-
"execution_count": 8,
42+
"execution_count": 4,
4343
"metadata": {
4444
"collapsed": false
4545
},
46-
"outputs": [],
46+
"outputs": [
47+
{
48+
"name": "stderr",
49+
"output_type": "stream",
50+
"text": [
51+
"//anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2723: DtypeWarning: Columns (0,3,5,27,36) have mixed types. Specify dtype option on import or set low_memory=False.\n",
52+
" interactivity=interactivity, compiler=compiler, result=result)\n"
53+
]
54+
}
55+
],
4756
"source": []
4857
},
4958
{
@@ -55,9 +64,10 @@
5564
},
5665
{
5766
"cell_type": "code",
58-
"execution_count": 9,
67+
"execution_count": 10,
5968
"metadata": {
60-
"collapsed": false
69+
"collapsed": false,
70+
"scrolled": true
6171
},
6272
"outputs": [
6373
{
@@ -270,7 +280,7 @@
270280
"[5 rows x 159 columns]"
271281
]
272282
},
273-
"execution_count": 9,
283+
"execution_count": 10,
274284
"metadata": {},
275285
"output_type": "execute_result"
276286
}
@@ -286,7 +296,7 @@
286296
},
287297
{
288298
"cell_type": "code",
289-
"execution_count": 49,
299+
"execution_count": 11,
290300
"metadata": {
291301
"collapsed": false
292302
},
@@ -297,7 +307,7 @@
297307
"65503"
298308
]
299309
},
300-
"execution_count": 49,
310+
"execution_count": 11,
301311
"metadata": {},
302312
"output_type": "execute_result"
303313
}
@@ -313,7 +323,7 @@
313323
},
314324
{
315325
"cell_type": "code",
316-
"execution_count": 52,
326+
"execution_count": 12,
317327
"metadata": {
318328
"collapsed": false
319329
},
@@ -343,7 +353,7 @@
343353
},
344354
{
345355
"cell_type": "code",
346-
"execution_count": 42,
356+
"execution_count": 13,
347357
"metadata": {
348358
"collapsed": false
349359
},
@@ -362,7 +372,7 @@
362372
" dtype='object', length=159)"
363373
]
364374
},
365-
"execution_count": 42,
375+
"execution_count": 13,
366376
"metadata": {},
367377
"output_type": "execute_result"
368378
}
@@ -378,7 +388,7 @@
378388
},
379389
{
380390
"cell_type": "code",
381-
"execution_count": 41,
391+
"execution_count": 14,
382392
"metadata": {
383393
"collapsed": false
384394
},
@@ -389,7 +399,7 @@
389399
"'glucose_100g'"
390400
]
391401
},
392-
"execution_count": 41,
402+
"execution_count": 14,
393403
"metadata": {},
394404
"output_type": "execute_result"
395405
}
@@ -405,7 +415,7 @@
405415
},
406416
{
407417
"cell_type": "code",
408-
"execution_count": 31,
418+
"execution_count": 15,
409419
"metadata": {
410420
"collapsed": false
411421
},
@@ -416,7 +426,7 @@
416426
"dtype('float64')"
417427
]
418428
},
419-
"execution_count": 31,
429+
"execution_count": 15,
420430
"metadata": {},
421431
"output_type": "execute_result"
422432
}
@@ -432,7 +442,7 @@
432442
},
433443
{
434444
"cell_type": "code",
435-
"execution_count": 32,
445+
"execution_count": 16,
436446
"metadata": {
437447
"collapsed": false
438448
},
@@ -443,7 +453,7 @@
443453
"RangeIndex(start=0, stop=65503, step=1)"
444454
]
445455
},
446-
"execution_count": 32,
456+
"execution_count": 16,
447457
"metadata": {},
448458
"output_type": "execute_result"
449459
}
@@ -454,23 +464,23 @@
454464
"cell_type": "markdown",
455465
"metadata": {},
456466
"source": [
457-
"### Step 11. Give me the product name of the 19th observation."
467+
"### Step 11. What is the product name of the 19th observation?"
458468
]
459469
},
460470
{
461471
"cell_type": "code",
462-
"execution_count": 40,
472+
"execution_count": 18,
463473
"metadata": {
464474
"collapsed": false
465475
},
466476
"outputs": [
467477
{
468478
"data": {
469479
"text/plain": [
470-
"'Sea Salt Potato Chips'"
480+
"'Flat Leaf Parsley'"
471481
]
472482
},
473-
"execution_count": 40,
483+
"execution_count": 18,
474484
"metadata": {},
475485
"output_type": "execute_result"
476486
}

0 commit comments

Comments
 (0)