This commit is contained in:
rasbt 2015-01-24 00:17:53 -05:00
parent 4edb98e53e
commit 3fccde15b1

View File

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:5455ed1ab796c2d7a01bee46d8f4d18de1bbc93ba0257248aff18e7b73a05e0a"
"signature": "sha256:01adffebfb99d8e7a86af443b9d14ca7695efc917465ea85868cc42681d6e96b"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -576,7 +576,8 @@
"cell_type": "code",
"collapsed": false,
"input": [
"# Create a new column\n",
"# Creating a new column\n",
"\n",
"df['team'] = pd.Series('', index=df.index)\n",
"df.tail(3)"
],
@ -664,7 +665,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
"# process salary column\n",
"# Processing `salary` column\n",
"\n",
"df['salary'] = df['salary'].apply(lambda x: x.strip('$m'))\n",
"df.tail()"
@ -781,7 +782,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
"# process `player` column\n",
"# Processing `player` column\n",
"\n",
"def process_player_col(text):\n",
" name, rest = text.split('\\n')\n",