8000 inplace ops update · twistedtree/python_reference@d2039a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit d2039a7

Browse files
committed
inplace ops update
1 parent 632aef1 commit d2039a7

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

tutorials/things_in_pandas.ipynb

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:cf7223086a74b13d1ae2228a4c8545c401765a90cdb3eca418f18138a4afdaab"
4+
"signature": "sha256:2c7029e546d20c06eaa707f59d5b067689bf8827b87cc32f4fae7b55cde6e0f2"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -29,7 +29,7 @@
2929
"output_type": "stream",
3030
"stream": "stdout",
3131
"text": [
32-
"Sebastian Raschka 24/01/2015 \n",
32+
"Sebastian Raschka 25/01/2015 \n",
3333
"\n",
3434
"CPython 3.4.2\n",
3535
"IPython 2.3.1\n",
@@ -890,7 +890,7 @@
890890
],
891891
"metadata": {},
892892
"output_type": "pyout",
893-
"prompt_number": 8,
893+
"prompt_number": 7,
894894
"text": [
895895
" player salary games goals assists shots_on_target \\\n",
896896
"7 Cesc F\u00e0bregas 14.0 20 2 14 10 \n",
@@ -904,7 +904,7 @@
904904
]
905905
}
906906
],
907-
"prompt_number": 8
907+
"prompt_number": 7
908908
},
909909
{
910910
"cell_type": "markdown",
@@ -1008,7 +1008,7 @@
10081008
],
10091009
"metadata": {},
10101010
"output_type": "pyout",
1011-
"prompt_number": 9,
1011+
"prompt_number": 8,
10121012
"text": [
10131013
" player salary games goals assists shots_on_target \\\n",
10141014
"4 \u00c1ngel Di Mar\u00eda 15.0 13 3 NaN 13 \n",
@@ -1020,7 +1020,7 @@
10201020
]
10211021
}
10221022
],
1023-
"prompt_number": 9
1023+
"prompt_number": 8
10241024
},
10251025
{
10261026
"cell_type": "markdown",
@@ -1177,7 +1177,7 @@
11771177
],
11781178
"metadata": {},
11791179
"output_type": "pyout",
1180-
"prompt_number": 10,
1180+
"prompt_number": 9,
11811181
"text": [
11821182
" player salary games goals assists shots_on_target \\\n",
11831183
"0 Sergio Ag\u00fcero 19.2 16 14 3 34 \n",
@@ -1201,7 +1201,7 @@
12011201
]
12021202
}
12031203
],
1204-
"prompt_number": 10
1204+
"prompt_number": 9
12051205
},
12061206
{
12071207
"cell_type": "markdown",
@@ -1225,7 +1225,7 @@
12251225
"input": [
12261226
"# Filling NaN cells with default value 0\n",
12271227
"\n",
1228-
"df = df.fillna(value=0)\n",
1228+
"df.fillna(value=0, inplace=True)\n",
12291229
"df"
12301230
],
12311231
"language": "python",
@@ -1387,7 +1387,7 @@
13871387
],
13881388
"metadata": {},
13891389
"output_type": "pyout",
1390-
"prompt_number": 11,
1390+
"prompt_number": 10,
13911391
"text": [
13921392
" player salary games goals assists shots_on_target \\\n",
13931393
"0 Sergio Ag\u00fcero 19.2 16 14 3 34 \n",
@@ -1415,7 +1415,7 @@
14151415
]
14161416
}
14171417
],
1418-
"prompt_number": 11
1418+
"prompt_number": 10
14191419
},
14201420
{
14211421
"cell_type": "markdown",
@@ -1523,7 +1523,7 @@
15231523
],
15241524
"metadata": {},
15251525
"output_type": "pyout",
1526-
"prompt_number": 12,
1526+
"prompt_number": 11,
15271527
"text": [
15281528
" player salary games goals assists shots_on_target \\\n",
15291529
"8 Saido Berahino 13.8 21 9 0 20 \n",
@@ -1537,7 +1537,7 @@
15371537
]
15381538
}
15391539
],
1540-
"prompt_number": 12
1540+
"prompt_number": 11
15411541
},
15421542
{
15431543
"cell_type": "code",
@@ -1617,7 +1617,7 @@
16171617
],
16181618
"metadata": {},
16191619
"output_type": "pyout",
1620-
"prompt_number": 13,
1620+
"prompt_number": 12,
16211621
"text": [
16221622
" player salary games goals assists shots_on_target \\\n",
16231623
"8 Saido Berahino 13.8 21 9 0 20 \n",
@@ -1631,7 +1631,7 @@
16311631
]
16321632
}
16331633
],
1634-
"prompt_number": 13
1634+
"prompt_number": 12
16351635
},
16361636
{
16371637
"cell_type": "markdown",
@@ -1662,7 +1662,7 @@
16621662
"input": [
16631663
"# Sorting the DataFrame by a certain column (from highest to lowest)\n",
16641664
"\n",
1665-
"df = df.sort('goals', ascending=False)\n",
1665+
"df.sort('goals', ascending=False, inplace=True)\n",
16661666
"df.head()"
16671667
],
16681668
"language": "python",
@@ -1759,7 +1759,7 @@
17591759
],
17601760
"metadata": {},
17611761
"output_type": "pyout",
1762-
"prompt_number": 14,
1762+
"prompt_number": 13,
17631763
"text": [
17641764
" player salary games goals assists shots_on_target \\\n",
17651765
"0 Sergio Ag\u00fcero 19.2 16 14 3 34 \n",
@@ -1777,7 +1777,7 @@
17771777
]
17781778
}
17791779
],
1780-
"prompt_number": 14
1780+
"prompt_number": 13
17811781
},
17821782
{
17831783
"cell_type": "code",
@@ -1882,7 +1882,7 @@
18821882
],
18831883
"metadata": {},
18841884
"output_type": "pyout",
1885-
"prompt_number": 15,
1885+
"prompt_number": 14,
18861886
"text": [
18871887
" player salary games goals assists shots_on_target \\\n",
18881888
"1 Sergio Ag\u00fcero 19.2 16 14 3 34 \n",
@@ -1900,7 +1900,7 @@
19001900
]
19011901
}
19021902
],
1903-
"prompt_number": 15
1903+
"prompt_number": 14
19041904
},
19051905
{
19061906
"cell_type": "markdown",
@@ -2003,7 +2003,7 @@
20032003
],
20042004
"metadata": {},
20052005
"output_type": "pyout",
2006-
"prompt_number": 16,
2006+
"prompt_number": 15,
20072007
"text": [
20082008
" player salary games goals assists shots_on_target \\\n",
20092009
"1 Sergio Ag\u00fcero 20 16 14 3 34 \n",
@@ -2017,7 +2017,7 @@
20172017
]
20182018
}
20192019
],
2020-
"prompt_number": 16
2020+
"prompt_number": 15
20212021
},
20222022
{
20232023
"cell_type": "markdown",
@@ -2114,7 +2114,7 @@
21142114
],
21152115
"metadata": {},
21162116
"output_type": "pyout",
2117-
"prompt_number": 17,
2117+
"prompt_number": 16,
21182118
"text": [
21192119
" salary games goals assists shots_on_target \\\n",
21202120
"player \n",
@@ -2130,7 +2130,7 @@
21302130
]
21312131
}
21322132
],
2133-
"prompt_number": 17
2133+
"prompt_number": 16
21342134
},
21352135
{
21362136
"cell_type": "markdown",
@@ -2224,7 +2224,7 @@
22242224
],
22252225
"metadata": {},
22262226
"output_type": "pyout",
2227-
"prompt_number": 18,
2227+
"prompt_number": 17,
22282228
"text": [
22292229
" salary games goals assists shots_on_target \\\n",
22302230
"player \n",
@@ -2240,7 +2240,7 @@
22402240
]
22412241
}
22422242
],
2243-
"prompt_number": 18
2243+
"prompt_number": 17
22442244
},
22452245
{
22462246
"cell_type": "markdown",
@@ -2326,7 +2326,7 @@
23262326
],
23272327
"metadata": {},
23282328
"output_type": "pyout",
2329-
"prompt_number": 19,
2329+
"prompt_number": 18,
23302330
"text": [
23312331
" player salary games goals assists shots_on_target \\\n",
23322332
"0 Sergio Ag\u00fcero 20 16 14 3 34 \n",
@@ -2340,7 +2340,7 @@
23402340
]
23412341
}
23422342
],
2343-
"prompt_number": 19
2343+
"prompt_number": 18
23442344
},
23452345
{
23462346
"cell_type": "markdown",
@@ -2454,7 +2454,7 @@
24542454
],
24552455
"metadata": {},
24562456
"output_type": "pyout",
2457-
"prompt_number": 20,
2457+
"prompt_number": 19,
24582458
"text": [
24592459
" player salary games goals assists shots_on_target \\\n",
24602460
"1 Alexis S\u00e1nchez 15 0 12 7 29 \n",
@@ -2470,7 +2470,7 @@
24702470
]
24712471
}
24722472
],
2473-
"prompt_number": 20
2473+
"prompt_number": 19
24742474
},
24752475
{
24762476
"cell_type": "code",
@@ -2522,7 +2522,7 @@
25222522
],
25232523
"metadata": {},
25242524
"output_type": "pyout",
2525-
"prompt_number": 22,
2525+
"prompt_number": 20,
25262526
"text": [
25272527
" player salary games goals assists shots_on_target \\\n",
25282528
"1 Alexis S\u00e1nchez 15 0 12 7 29 \n",
@@ -2532,7 +2532,7 @@
25322532
]
25332533
}
25342534
],
2535-
"prompt_number": 22
2535+
"prompt_number": 20
25362536
}
25372537
],
25382538
"metadata": {}

0 commit comments

Comments
 (0)
0