Skip to content

Commit a76cc71

Browse files
authored
pandas: imports
1 parent 2f98f19 commit a76cc71

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

book/pandas/attributes.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 66,
39+
"execution_count": null,
4040
"metadata": {
4141
"collapsed": true,
4242
"nbgrader": {
@@ -178,6 +178,8 @@
178178
}
179179
],
180180
"source": [
181+
"import pandas as pd\n",
182+
"\n",
181183
"file_location = (\"mineral_properties.txt\")\n",
182184
"df4 = pd.read_csv(file_location, sep=',', header=[1],\n",
183185
" skiprows=None, index_col=0)\n",

book/pandas/frame.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
{
4141
"cell_type": "code",
42-
"execution_count": 38,
42+
"execution_count": null,
4343
"metadata": {
4444
"collapsed": true,
4545
"nbgrader": {
@@ -53,6 +53,8 @@
5353
},
5454
"outputs": [],
5555
"source": [
56+
"import pandas as pd\n",
57+
"\n",
5658
"row_1 = pd.Series(['Garnet', 7.0, 'Fracture', 3.9 ])\n",
5759
"row_2 = pd.Series(['Graphite', 1.5, 'One', 2.3 ])\n",
5860
"row_3 = pd.Series(['Kyanite', 6, 'One', 4.01 ])\n",

book/pandas/nutshell/frame.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 14,
14+
"execution_count": null,
1515
"metadata": {},
1616
"outputs": [
1717
{
@@ -83,6 +83,8 @@
8383
}
8484
],
8585
"source": [
86+
"import pandas as pd\n",
87+
"\n",
8688
"data2 = {'Name': ['John', 'Alice', 'Bob'],\n",
8789
" 'Age': [25, 28, 22],\n",
8890
" 'City': ['London', 'Paris', 'Berlin']}\n",

book/pandas/statistics.ipynb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
}
4141
],
4242
"source": [
43+
"import pandas as pd\n",
44+
"file_location = (\"mineral_properties.txt\")\n",
45+
"df4 = pd.read_csv(file_location + 'mineral_properties.txt',sep=',',header=[1], \n",
46+
" skiprows=None, index_col=0, skipinitialspace=True)\n",
47+
" \n",
48+
"\n",
4349
"df4['hardness'].mean()"
4450
]
4551
},

0 commit comments

Comments
 (0)