Skip to content

Commit 0a12df4

Browse files
committed
Add missing import
1 parent 277e25e commit 0a12df4

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

notebooks/02.09-Structured-Data-NumPy.ipynb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,24 @@
3030
"cell_type": "markdown",
3131
"metadata": {},
3232
"source": [
33-
"While often our data can be well represented by a homogeneous array of values, sometimes this is not the case. This section demonstrates the use of NumPy's *structured arrays* and *record arrays*, which provide efficient storage for compound, heterogeneous data. While the patterns shown here are useful for simple operations, scenarios like this often lend themselves to the use of Pandas ``Dataframe``s, which we'll explore in [Chapter 3](03.00-Introduction-to-Pandas.ipynb).\n",
34-
"\n",
33+
"While often our data can be well represented by a homogeneous array of values, sometimes this is not the case. This section demonstrates the use of NumPy's *structured arrays* and *record arrays*, which provide efficient storage for compound, heterogeneous data. While the patterns shown here are useful for simple operations, scenarios like this often lend themselves to the use of Pandas ``Dataframe``s, which we'll explore in [Chapter 3](03.00-Introduction-to-Pandas.ipynb)."
34+
]
35+
},
36+
{
37+
"cell_type": "code",
38+
"execution_count": 1,
39+
"metadata": {
40+
"collapsed": true
41+
},
42+
"outputs": [],
43+
"source": [
44+
"import numpy as np"
45+
]
46+
},
47+
{
48+
"cell_type": "markdown",
49+
"metadata": {},
50+
"source": [
3551
"Imagine that we have several categories of data on a number of people (say, name, age, and weight), and we'd like to store these values for use in a Python program.\n",
3652
"It would be possible to store these in three separate arrays:"
3753
]

0 commit comments

Comments
 (0)