Commit 67d32333 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+15 −0
Changes for Introduction to Pandas for Developers - Working Files/Chapter 1/Introduction-Installation.ipynb: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
%% Cell type:markdown id: tags:

## Installing Pandas

%% Cell type:markdown id: tags:

Install anaconda from https://www.continuum.io/downloads

Run:

``conda install pandas jupyter``

Run:

``jupyter-notebook``
+7 −0
Changes for Introduction to Pandas for Developers - Working Files/Chapter 1/Introduction-Vs.ipynb: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
%% Cell type:markdown id: tags:

## Why Pandas?

* vs R
* vs Excel
* vs Matlab
+70 −0
Changes for Introduction to Pandas for Developers - Working Files/Chapter 1/Introduction.ipynb: 70 added lines, 0 removed lines.
Original line number Diff line number Diff line
%% Cell type:code id: tags:

``` python
import pandas as pd
```

%% Cell type:code id: tags:

``` python
df = pd.read_csv('beatles.csv')
```

%% Cell type:code id: tags:

``` python
df
```

%% Output

       Unnamed: 0                                  Title    Released  \
    0           0                    Yesterday and Today  1966-06-15
    1           1                               Revolver  1966-08-05
    2           2                               Revolver  1966-08-08
    3           3  Sgt. Pepper's Lonely Hearts Club Band  1967-06-01
    4           4                   Magical Mystery Tour  1967-11-27
    5           5                            The Beatles  1968-11-22
    6           6                       Yellow Submarine  1969-01-13
    7           7                             Abbey Road  1969-09-26
    8           8                              Let It Be  1970-05-08
    
                              Label  UK Chart Position  US Chart Position  \
    0                   Capitol(US)                NaN                  1
    1                Parlophone(UK)                  1                NaN
    2                Capitol(US)[C]                NaN                  1
    3   Parlophone(UK), Capitol(US)                  1                  1
    4   Parlophone(UK), Capitol(US)                NaN                  1
    5        Apple(UK), Capitol(US)                  1                  1
    6        Apple(UK), Capitol(US)                  3                  2
    7        Apple(UK), Capitol(US)                  1                  1
    8  Apple(UK),United Artists(US)                  1                  1
    
      BPI Certification RIAA Certification  Count Songs  Year
    0               NaN         2xPlatinum           11  1966
    1          Platinum                NaN           14  1966
    2               NaN         5xPlatinum           14  1966
    3        3xPlatinum        11xPlatinum           13  1967
    4          Platinum         6xPlatinum           11  1967
    5          Platinum        19xPlatinum           30  1968
    6            Silver           Platinum            6  1969
    7        2xPlatinum        12xPlatinum           17  1969
    8              Gold         4xPlatinum           12  1970

%% Cell type:code id: tags:

``` python
%matplotlib inline
```

%% Cell type:code id: tags:

``` python
df['Count Songs'].hist()
```

%% Output

    <matplotlib.axes._subplots.AxesSubplot at 0x11150a128>

+10 −0
Changes for Introduction to Pandas for Developers - Working Files/Chapter 1/beatles.csv: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
,Title,Released,Label,UK Chart Position,US Chart Position,BPI Certification,RIAA Certification,Count Songs,Year
0,Yesterday and Today,1966-06-15,Capitol(US),,1.0,,2xPlatinum,11,1966
1,Revolver,1966-08-05,Parlophone(UK),1.0,,Platinum,,14,1966
2,Revolver,1966-08-08,Capitol(US)[C],,1.0,,5xPlatinum,14,1966
3,Sgt. Pepper's Lonely Hearts Club Band,1967-06-01,"Parlophone(UK), Capitol(US)",1.0,1.0,3xPlatinum,11xPlatinum,13,1967
4,Magical Mystery Tour,1967-11-27,"Parlophone(UK), Capitol(US)",,1.0,Platinum,6xPlatinum,11,1967
5,The Beatles,1968-11-22,"Apple(UK), Capitol(US)",1.0,1.0,Platinum,19xPlatinum,30,1968
6,Yellow Submarine,1969-01-13,"Apple(UK), Capitol(US)",3.0,2.0,Silver,Platinum,6,1969
7,Abbey Road,1969-09-26,"Apple(UK), Capitol(US)",1.0,1.0,2xPlatinum,12xPlatinum,17,1969
8,Let It Be,1970-05-08,"Apple(UK),United Artists(US)",1.0,1.0,Gold,4xPlatinum,12,1970
+591 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading