Source

Learn Pandas / lessons / 01 - Lesson.ipynb

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
{
 "metadata": {
  "name": "01 - Lesson"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "# **Lesson 1**  \n",
      "\n",
      "**Create Data** - We begin by creating our own data set for analysis. This prevents the end user reading this tutorial from having to download any files to replicate the results below. We will export this data set to a text file so that you can get some experience pulling data from a text file.  \n",
      "**Get Data** - We will learn how to read in the text file. The data consist of baby names and the number of baby names born in the year 1880.  \n",
      "**Prepare Data** - Here we will simply take a look at the data and make sure it is clean. By clean I mean we will take a look inside the contents of the text file and look for any anomalities. These can include missing data, inconsistencies in the data, or any other data that seems out of place. If any are found we will then have to make decisions on what to do with these records.  \n",
      "**Analyze Data** - We will simply find the most popular name in a specific year.  \n",
      "**Present Data** - Through tabular data and a graph, clearly show the end user what is the most popular name in a specific year.       \n",
      "    "
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The ***pandas*** library is used for all the data analysis excluding a small piece of the data presentation section. The ***matplotlib*** library will only be needed for the data presentation section. Importing the libraries is the first step we will take in the lesson."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Import all libraries needed for the tutorial\n",
      "\n",
      "# General syntax to import specific functions in a library: \n",
      "##from (library) import (specific library function)\n",
      "from pandas import DataFrame, read_csv\n",
      "\n",
      "# General syntax to import a library but no functions: \n",
      "##import (library) as (give the library a nickname/alias)\n",
      "import matplotlib.pyplot as plt\n",
      "import pandas as pd #only needed to determine version number"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "print 'Pandas version ' + pd.__version__"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pandas version 0.11.0\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "# Create Data  \n",
      "\n",
      "The data set will consist of 5 baby names and the number of births recorded for that year (1880)."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# The inital set of baby names and bith rates\n",
      "names = ['Bob','Jessica','Mary','John','Mel']\n",
      "births = [968, 155, 77, 578, 973]\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "To merge these two lists together we will use the ***zip*** function."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "'''\n",
      "zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]\n",
      "Return a list of tuples, where each tuple contains the i-th element\n",
      "from each of the argument sequences.  The returned list is truncated\n",
      "in length to the length of the shortest argument sequence.\n",
      "'''\n",
      "\n",
      "zip?"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "BabyDataSet = zip(names,births)\n",
      "print BabyDataSet"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "[('Bob', 968), ('Jessica', 155), ('Mary', 77), ('John', 578), ('Mel', 973)]\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "We are basically done creating the data set. We now will use the ***pandas*** library to export this data set into a csv file. \n",
      "\n",
      "***df*** will be a ***DataFrame*** object. You can think of this object holding the contents of the BabyDataSet in a format similar to a sql table or an excel spreadsheet. Lets take a look below at the contents inside ***df***."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "df = DataFrame(data = BabyDataSet, columns=['Names', 'Births'])\n",
      "df"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>Names</th>\n",
        "      <th>Births</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>     Bob</td>\n",
        "      <td> 968</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td> Jessica</td>\n",
        "      <td> 155</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>    Mary</td>\n",
        "      <td>  77</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>    John</td>\n",
        "      <td> 578</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td>     Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 6,
       "text": [
        "     Names  Births\n",
        "0      Bob     968\n",
        "1  Jessica     155\n",
        "2     Mary      77\n",
        "3     John     578\n",
        "4      Mel     973"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "* Export the dataframe to a ***csv*** file. We can name the file ***births1880.csv***. The function ***to_csv*** will be used to export the file. The file will be saved in the same location of the notebook unless specified otherwise."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "'''\n",
      "df.to_csv(self, path_or_buf, sep=',', na_rep='', float_format=None, cols=None, header=True, index=True, index_label=None, mode='w', nanRep=None, encoding=None, quoting=None, line_terminator='\\n')\n",
      "Write DataFrame to a comma-separated values (csv) file\n",
      "'''\n",
      "\n",
      "df.to_csv?"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 7
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The only parameters we will use is ***index*** and ***header***. Setting these parameters to True will prevent the index and header names from being exported. Change the values of these parameters to get a better understanding of their use."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "df.to_csv('births1880.csv',index=False,header=False)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 8
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Get Data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "To pull in the text file, we will use the pandas function *read_csv*. Let us take a look at this function and what inputs it takes.  \n",
      "\n",
      "read_csv(filepath_or_buffer, sep=',', dialect=None, compression=None, doublequote=True, escapechar=None, quotechar='\"', quoting=0, skipinitialspace=False, lineterminator=None, header='infer', index_col=None, names=None, prefix=None, skiprows=None, skipfooter=None, skip_footer=0, na_values=None, true_values=None, false_values=None, delimiter=None, converters=None, dtype=None, usecols=None, engine='c', delim_whitespace=False, as_recarray=False, na_filter=True, compact_ints=False, use_unsigned=False, low_memory=True, buffer_lines=None, warn_bad_lines=True, error_bad_lines=True, keep_default_na=True, thousands=None, comment=None, decimal='.', parse_dates=False, keep_date_col=False, dayfirst=False, date_parser=None, memory_map=False, nrows=None, iterator=False, chunksize=None, verbose=False, encoding=None, squeeze=False)"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "read_csv?"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 9
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Even though this functions has many parameters, we will simply pass it the location of the text file.  \n",
      "\n",
      "Location = C:\\Users\\ENTER_USER_NAME\\.xy\\startups\\births1880.csv  \n",
      "\n",
      "***Note:*** Depending on where you save your notebooks, you may need to modify the location above.  "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Location = r'C:\\Users\\hdrojas\\.xy\\startups\\births1880.csv'\n",
      "df = read_csv(Location)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 10
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Notice the ***r*** before the string. Since the slashes are special characters, prefixing the string with a ***r*** will escape the whole string.  "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "df"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>Bob</th>\n",
        "      <th>968</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td> Jessica</td>\n",
        "      <td> 155</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td>    Mary</td>\n",
        "      <td>  77</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>    John</td>\n",
        "      <td> 578</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>     Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 11,
       "text": [
        "       Bob  968\n",
        "0  Jessica  155\n",
        "1     Mary   77\n",
        "2     John  578\n",
        "3      Mel  973"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "This brings us the our first problem of the exercise. The ***read_csv*** function treated the first record in the text file as the header names. This is obviously not correct since the text file did not provide us with header names.  \n",
      "\n",
      "To correct this we will pass the ***header*** parameter to the *read_csv* function and set it to ***None*** (means null in python)."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "df = read_csv(Location, header=None)\n",
      "df"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>0</th>\n",
        "      <th>1</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>     Bob</td>\n",
        "      <td> 968</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td> Jessica</td>\n",
        "      <td> 155</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>    Mary</td>\n",
        "      <td>  77</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>    John</td>\n",
        "      <td> 578</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td>     Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 12,
       "text": [
        "         0    1\n",
        "0      Bob  968\n",
        "1  Jessica  155\n",
        "2     Mary   77\n",
        "3     John  578\n",
        "4      Mel  973"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "If we wanted to give the columns specific names, we would have to pass another paramter called ***names***. We can also omit the *header* parameter."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "df = read_csv(Location, names=['Names','Births'])\n",
      "df"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>Names</th>\n",
        "      <th>Births</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>     Bob</td>\n",
        "      <td> 968</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td> Jessica</td>\n",
        "      <td> 155</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>    Mary</td>\n",
        "      <td>  77</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>    John</td>\n",
        "      <td> 578</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td>     Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 13,
       "text": [
        "     Names  Births\n",
        "0      Bob     968\n",
        "1  Jessica     155\n",
        "2     Mary      77\n",
        "3     John     578\n",
        "4      Mel     973"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "You can think of the numbers [0,1,2,3,4] as the row numbers in an Excel file. In pandas these are part of the ***index*** of the dataframe. You can think of the index as the primary key of a sql table with the exception that an index is allowed to have duplicates.  \n",
      "\n",
      "[Names, Births] can be though of as column headers similar to the ones found in an Excel spreadsheet or sql database."
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Delete the csv file now that we are done using it."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import os\n",
      "os.remove(Location)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 14
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Prepare Data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The data we have consists of baby names and the number of births in the year 1880. We already know that we have 5 records and none of the records are missing (non-null values).  "
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The ***Names*** column at this point is of no concern since it most likely is just composed of alpha numeric strings (baby names). There is a chance of bad data in this column but we will not worry about that at this point of the analysis. The ***Births*** column should just contain integers representing the number of babies born in a specific year with a specific name. We can check if the all the data is of the data type integer. It would not make sense to have this column have a data type of float. I would not worry about any possible outliers at this point of the analysis.  \n",
      "\n",
      "Realize that aside from the check we did on the \"Names\" column, briefly looking at the data inside the dataframe should be as far as we need to go at this stage of the game. As we continue in the data analysis life cycle we will have plenty of opportunities to find any issues with the data set."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Check data type of the columns\n",
      "print df.dtypes"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Names     object\n",
        "Births     int64\n",
        "dtype: object\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Check data type of Births column\n",
      "df.Births.dtype"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 16,
       "text": [
        "dtype('int64')"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "As you can see the *Births* column is of type ***int***, thus no floats (decimal numbers) or alpha numeric characters will be present in this column."
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Analyze Data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "To find the most popular name or the baby name with the higest birth rate, we can do one of the following.  \n",
      "\n",
      "* Sort the dataframe and select the top row\n",
      "* Use the ***max()*** attribute to find the maximum value"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Method 1:\n",
      "Sorted = df.sort(['Births'], ascending=[0])\n",
      "Sorted.head(1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>Names</th>\n",
        "      <th>Births</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td> Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 17,
       "text": [
        "  Names  Births\n",
        "4   Mel     973"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Method 2:\n",
      "df['Births'].max()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "pyout",
       "prompt_number": 18,
       "text": [
        "973"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "## Present Data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Here we can plot the ***Births*** column and label the graph to show the end user the highest point on the graph. In conjunction with the table, the end user has a clear picture that **Mel** is the most popular baby name in the data set. \n",
      "\n",
      "***plot()*** is a convinient attribute where pandas lets you painlessly plot the data in your dataframe. We learned how to find the maximum value of the Births column in the previous section. Now to find the actual baby name of the 973 value looks a bit tricky, so lets go over it.  \n",
      "\n",
      "**Explain the pieces:**  \n",
      "*df['Names']* - This is the entire list of baby names, the entire Names column  \n",
      "*df['Births']* - This is the entire list of Births in the year 1880, the entire Births column  \n",
      "*df['Births'].max()* - This is the maximum value found in the Births column  \n",
      "\n",
      "[df['Births'] == df['Births'].max()] **IS EQUAL TO** [Find all of the records in the Births column where it is equal to 973]  \n",
      "df['Names'][df['Births'] == df['Births'].max()] **IS EQUAL TO** Select all of the records in the Names column **WHERE** [The Births column is equal to 973]  \n",
      "\n",
      "An alternative way could have been to use the ***Sorted*** dataframe:  \n",
      "Sorted['Names'].head(1).value  \n",
      "\n",
      "The ***str()*** function simply converts an object into a string.  "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Create graph\n",
      "df['Births'].plot()\n",
      "\n",
      "# Maximum value in the data set\n",
      "MaxValue = df['Births'].max()\n",
      "\n",
      "# Name associated with the maximum value\n",
      "MaxName = df['Names'][df['Births'] == df['Births'].max()].values\n",
      "\n",
      "# Text to display on graph\n",
      "Text = str(MaxValue) + \" - \" + MaxName\n",
      "\n",
      "# Add text to graph\n",
      "plt.annotate(Text, xy=(1, MaxValue), xytext=(8, 0), \n",
      "                 xycoords=('axes fraction', 'data'), textcoords='offset points')\n",
      "\n",
      "print \"The most popular name\"\n",
      "df[df['Births'] == df['Births'].max()]\n",
      "#Sorted.head(1) can also be used"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The most popular name\n"
       ]
      },
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>Names</th>\n",
        "      <th>Births</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td> Mel</td>\n",
        "      <td> 973</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "output_type": "pyout",
       "prompt_number": 19,
       "text": [
        "  Names  Births\n",
        "4   Mel     973"
       ]
      },
      {
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAbYAAAD9CAYAAADQ4VJrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xlc1VX+x/EXiOWWopk4gYUJhoAKWtrUr6QcxJUxNQtT\nMXWmyXSyRc3KFmcSXDI1R0tNpSyBqcklG1InUVvct5IKmyDZpDGkzA2E7++PE1eugFwu997v93vv\n5/l48Ohx9zeHPJ/7Ped8z9dL0zQNIYQQwk146x1ACCGEcCQpbEIIIdyKFDYhhBBuRQqbEEIItyKF\nTQghhFuRwiaEEMKtXLGwjR07Fj8/Pzp37my5r6ioiOjoaDp27EifPn0oLi62PJaQkEBwcDAhISFs\n3rzZcv/+/fvp3LkzwcHBPPbYY074NYQQQgjlioXtoYceIi0tzeq+xMREoqOjyczMpHfv3iQmJgKQ\nkZFBSkoKGRkZpKWlMWHCBCpOkXvkkUd48803OXbsGMeOHavynkIIIYSjXLGw3XnnnbRs2dLqvg0b\nNhAfHw9AfHw869atA2D9+vXExcXRsGFDAgMDCQoKYvfu3RQUFHD69Gl69OgBwOjRoy2vEUIIIRyt\nznNshYWF+Pn5AeDn50dhYSEA+fn5BAQEWJ4XEBBAXl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QlwGeffcaaNWvo0qWLpWObNWsWx48ft2Q1QpvaktMIbVpQUEB8fDzl5eWUl5cz\natQoevfubah/67bmNEJ7VlYxxGi0tjQKl+0VKYQQQriCXEFbCCGEW5HCJoQQwq1IYRNCCOFWpLAJ\nIYRwK1LYhBBCuBUpbEIIIdzK/wOfDtU3W+HmjAAAAABJRU5ErkJggg==\n"
      }
     ],
     "prompt_number": 19
    }
   ],
   "metadata": {}
  }
 ]
}