Skip to content

Commit 737e04b

Browse files
author
Sara Rubinow
committed
corrected typo, added python version note
1 parent bb490ba commit 737e04b

File tree

1 file changed

+51
-39
lines changed

1 file changed

+51
-39
lines changed

pandas/pandas_sandbox.ipynb

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"collapsed": false
77
},
88
"source": [
9+
"\n",
910
"#🐼 Sandbox for pandas\n",
1011
"\n",
11-
"Play with the pandas data analysis library for Python.\n",
12+
"Play with the pandas data analysis library for Python. \n",
1213
"\n",
1314
"[Setup](#setup)\n",
1415
"\n",
@@ -35,18 +36,20 @@
3536
"source": [
3637
"###Setup<a id=\"setup\"></a>\n",
3738
"\n",
38-
"If you have [Anaconda](https://www.continuum.io/downloads) installed, it includes all the packages you'll need to import. \n",
39+
"If you have [Anaconda](https://www.continuum.io/downloads) installed, it includes [Jupyter (IPython) notebook](http://jupyter.org/) and all the packages you'll need to import. \n",
3940
"\n",
4041
"If you aren't using Anaconda, download and install the following packages via pip with `pip install [packagename]` \n",
4142
"\n",
4243
"- [pandas](http://pandas.pydata.org): a data analysis library.\n",
4344
"- [numpy](http://www.numpy.org/): pandas is built on top of numpy, a Python extension for working with arrays and math.\n",
44-
"- [matplotlib](http://matplotlib.org/): a plotting library that plays well with pandas DataFrames and numpy arrays."
45+
"- [matplotlib](http://matplotlib.org/): a plotting library that plays well with pandas DataFrames and numpy arrays.\n",
46+
"\n",
47+
"*Please note: This is a Python 2.7 notebook. If your Jupyter notebook is running on Python 3, avoid errors by [setting up a Python 2 kernel](https://ipython.readthedocs.org/en/latest/install/kernel_install.html).*"
4548
]
4649
},
4750
{
4851
"cell_type": "code",
49-
"execution_count": 165,
52+
"execution_count": 1,
5053
"metadata": {
5154
"collapsed": true
5255
},
@@ -78,7 +81,7 @@
7881
},
7982
{
8083
"cell_type": "code",
81-
"execution_count": 71,
84+
"execution_count": 2,
8285
"metadata": {
8386
"collapsed": true
8487
},
@@ -110,7 +113,7 @@
110113
},
111114
{
112115
"cell_type": "code",
113-
"execution_count": 72,
116+
"execution_count": 3,
114117
"metadata": {
115118
"collapsed": false
116119
},
@@ -228,7 +231,7 @@
228231
"4 1 1 0 0 0 1 3 "
229232
]
230233
},
231-
"execution_count": 72,
234+
"execution_count": 3,
232235
"metadata": {},
233236
"output_type": "execute_result"
234237
}
@@ -250,7 +253,7 @@
250253
},
251254
{
252255
"cell_type": "code",
253-
"execution_count": 73,
256+
"execution_count": 4,
254257
"metadata": {
255258
"collapsed": false
256259
},
@@ -375,7 +378,7 @@
375378
"10740 1 0 1 1 1 5 "
376379
]
377380
},
378-
"execution_count": 73,
381+
"execution_count": 4,
379382
"metadata": {},
380383
"output_type": "execute_result"
381384
}
@@ -394,7 +397,7 @@
394397
},
395398
{
396399
"cell_type": "code",
397-
"execution_count": 74,
400+
"execution_count": 5,
398401
"metadata": {
399402
"collapsed": false
400403
},
@@ -485,7 +488,7 @@
485488
"3715 1 0 1 1 1 5 "
486489
]
487490
},
488-
"execution_count": 74,
491+
"execution_count": 5,
489492
"metadata": {},
490493
"output_type": "execute_result"
491494
}
@@ -504,10 +507,10 @@
504507
},
505508
{
506509
"cell_type": "code",
507-
"execution_count": 111,
510+
"execution_count": 6,
508511
"metadata": {
509512
"collapsed": false,
510-
"scrolled": true
513+
"scrolled": false
511514
},
512515
"outputs": [
513516
{
@@ -1585,7 +1588,7 @@
15851588
"[10741 rows x 10 columns]"
15861589
]
15871590
},
1588-
"execution_count": 111,
1591+
"execution_count": 6,
15891592
"metadata": {},
15901593
"output_type": "execute_result"
15911594
}
@@ -1616,7 +1619,7 @@
16161619
},
16171620
{
16181621
"cell_type": "code",
1619-
"execution_count": 160,
1622+
"execution_count": 7,
16201623
"metadata": {
16211624
"collapsed": false
16221625
},
@@ -1645,7 +1648,8 @@
16451648
],
16461649
"source": [
16471650
"# get summary information about your DataFrame\n",
1648-
"df.info()"
1651+
"df.info()\n",
1652+
"select = df"
16491653
]
16501654
},
16511655
{
@@ -1657,7 +1661,7 @@
16571661
},
16581662
{
16591663
"cell_type": "code",
1660-
"execution_count": 161,
1664+
"execution_count": 8,
16611665
"metadata": {
16621666
"collapsed": false
16631667
},
@@ -1786,7 +1790,7 @@
17861790
"max 1.000000 6.000000 "
17871791
]
17881792
},
1789-
"execution_count": 161,
1793+
"execution_count": 8,
17901794
"metadata": {},
17911795
"output_type": "execute_result"
17921796
}
@@ -1811,7 +1815,7 @@
18111815
},
18121816
{
18131817
"cell_type": "code",
1814-
"execution_count": 162,
1818+
"execution_count": 9,
18151819
"metadata": {
18161820
"collapsed": false,
18171821
"scrolled": true
@@ -2022,7 +2026,7 @@
20222026
"The Miriam and Ira D. Wallach Division of Art, Prints and Photographs: Print Collection 4.110000 "
20232027
]
20242028
},
2025-
"execution_count": 162,
2029+
"execution_count": 9,
20262030
"metadata": {},
20272031
"output_type": "execute_result"
20282032
}
@@ -2042,7 +2046,7 @@
20422046
},
20432047
{
20442048
"cell_type": "code",
2045-
"execution_count": 163,
2049+
"execution_count": 10,
20462050
"metadata": {
20472051
"collapsed": false
20482052
},
@@ -2160,7 +2164,7 @@
21602164
"178 1 1 1 1 6 "
21612165
]
21622166
},
2163-
"execution_count": 163,
2167+
"execution_count": 10,
21642168
"metadata": {},
21652169
"output_type": "execute_result"
21662170
}
@@ -2179,7 +2183,7 @@
21792183
},
21802184
{
21812185
"cell_type": "code",
2182-
"execution_count": 164,
2186+
"execution_count": 11,
21832187
"metadata": {
21842188
"collapsed": false
21852189
},
@@ -2192,7 +2196,7 @@
21922196
"dtype: int64"
21932197
]
21942198
},
2195-
"execution_count": 164,
2199+
"execution_count": 11,
21962200
"metadata": {},
21972201
"output_type": "execute_result"
21982202
}
@@ -2215,7 +2219,7 @@
22152219
},
22162220
{
22172221
"cell_type": "code",
2218-
"execution_count": 84,
2222+
"execution_count": 12,
22192223
"metadata": {
22202224
"collapsed": false
22212225
},
@@ -2245,7 +2249,7 @@
22452249
},
22462250
{
22472251
"cell_type": "code",
2248-
"execution_count": 105,
2252+
"execution_count": 13,
22492253
"metadata": {
22502254
"collapsed": false
22512255
},
@@ -2277,11 +2281,19 @@
22772281
},
22782282
{
22792283
"cell_type": "code",
2280-
"execution_count": 139,
2284+
"execution_count": 14,
22812285
"metadata": {
22822286
"collapsed": false
22832287
},
22842288
"outputs": [
2289+
{
2290+
"name": "stderr",
2291+
"output_type": "stream",
2292+
"text": [
2293+
"C:\\Anaconda\\lib\\site-packages\\pandas\\core\\frame.py:1808: UserWarning: Boolean Series key will be reindexed to match DataFrame index.\n",
2294+
" \"DataFrame index.\", UserWarning)\n"
2295+
]
2296+
},
22852297
{
22862298
"data": {
22872299
"text/html": [
@@ -2333,7 +2345,7 @@
23332345
"20 86890560-c52c-012f-dbeb-58d385a7bc34 Cigarette cards"
23342346
]
23352347
},
2336-
"execution_count": 139,
2348+
"execution_count": 14,
23372349
"metadata": {},
23382350
"output_type": "execute_result"
23392351
}
@@ -2358,7 +2370,7 @@
23582370
},
23592371
{
23602372
"cell_type": "code",
2361-
"execution_count": 140,
2373+
"execution_count": 15,
23622374
"metadata": {
23632375
"collapsed": false,
23642376
"scrolled": true
@@ -2575,7 +2587,7 @@
25752587
"The Miriam and Ira D. Wallach Division of Art, Prints and Photographs: Print Collection 124 "
25762588
]
25772589
},
2578-
"execution_count": 140,
2590+
"execution_count": 15,
25792591
"metadata": {},
25802592
"output_type": "execute_result"
25812593
}
@@ -2603,7 +2615,7 @@
26032615
},
26042616
{
26052617
"cell_type": "code",
2606-
"execution_count": 159,
2618+
"execution_count": 16,
26072619
"metadata": {
26082620
"collapsed": false
26092621
},
@@ -3074,7 +3086,7 @@
30743086
"[161 rows x 2 columns]"
30753087
]
30763088
},
3077-
"execution_count": 159,
3089+
"execution_count": 16,
30783090
"metadata": {},
30793091
"output_type": "execute_result"
30803092
}
@@ -3095,14 +3107,14 @@
30953107
},
30963108
{
30973109
"cell_type": "code",
3098-
"execution_count": null,
3110+
"execution_count": 17,
30993111
"metadata": {
3100-
"collapsed": true
3112+
"collapsed": false
31013113
},
31023114
"outputs": [],
31033115
"source": [
31043116
"# export your data as a csv file\n",
3105-
"ids_by_collection.to_csv('ids_by_coll.csv')"
3117+
"ids_by_coll.to_csv('ids_by_coll.csv')"
31063118
]
31073119
},
31083120
{
@@ -3123,18 +3135,18 @@
31233135
},
31243136
{
31253137
"cell_type": "code",
3126-
"execution_count": 153,
3138+
"execution_count": 18,
31273139
"metadata": {
31283140
"collapsed": false
31293141
},
31303142
"outputs": [
31313143
{
31323144
"data": {
31333145
"text/plain": [
3134-
"<matplotlib.axes._subplots.AxesSubplot at 0x109caa90>"
3146+
"<matplotlib.axes._subplots.AxesSubplot at 0xcbda0b8>"
31353147
]
31363148
},
3137-
"execution_count": 153,
3149+
"execution_count": 18,
31383150
"metadata": {},
31393151
"output_type": "execute_result"
31403152
},
@@ -3286,7 +3298,7 @@
32863298
"SFBUSiISFJWSiARFpSQiQfl/w/6i69yPxGIAAAAASUVORK5CYII=\n"
32873299
],
32883300
"text/plain": [
3289-
"<matplotlib.figure.Figure at 0xfc5e400>"
3301+
"<matplotlib.figure.Figure at 0xc790da0>"
32903302
]
32913303
},
32923304
"metadata": {},

0 commit comments

Comments
 (0)