You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"This tour will work a little better in interactive mode, so it'll be better if you get IPython notebook installed and running. You can start it from a terminal by running\n",
22
+
"\n",
23
+
"`ipython notebook --pylab inline`\n",
24
+
"\n",
25
+
"The `--pylab inline` is for plotting graphs"
26
+
]
27
+
},
28
+
{
29
+
"cell_type": "markdown",
30
+
"metadata": {},
31
+
"source": [
32
+
"First, we need to explain how to run cells. Try to run the cell below!"
33
+
]
34
+
},
35
+
{
36
+
"cell_type": "code",
37
+
"collapsed": false,
38
+
"input": [
39
+
"import pandas as pd\n",
40
+
"\n",
41
+
"print \"Hi! This is a cell. Press the \u25b6 button above to run it\""
42
+
],
43
+
"language": "python",
44
+
"metadata": {},
45
+
"outputs": []
46
+
},
47
+
{
48
+
"cell_type": "markdown",
49
+
"metadata": {},
50
+
"source": [
51
+
"You can also run a cell with Ctrl+Enter or Shift+Enter. Experiment a bit with that."
52
+
]
53
+
},
54
+
{
55
+
"cell_type": "markdown",
56
+
"metadata": {},
57
+
"source": [
58
+
"One of the most useful things about IPython notebook is its tab completion. \n",
59
+
"\n",
60
+
"Try this: click just after read_csv( in the cell below and press tab 4 times, slowly"
"I find this amazingly useful. I think of this as \"the more confused I am, the more times I should press tab\". Nothing bad will happen if you press tab 12 times.\n",
98
+
"\n",
99
+
"Okay, let's try tab completion for function names!"
"As of the latest stable version, the notebook autosaves. You should use the latest stable version. Really."
181
+
]
182
+
},
183
+
{
184
+
"cell_type": "markdown",
185
+
"metadata": {},
186
+
"source": [
187
+
"# Magic functions"
188
+
]
189
+
},
190
+
{
191
+
"cell_type": "markdown",
192
+
"metadata": {},
193
+
"source": [
194
+
"IPython has all kinds of magic functions. Here's an example of comparing `sum()` with a list comprehension to a generator comprehension using the `%time` magic."
"The magics I use most are `%time` and `%prun` for profiling. You can run `%magic` to get a list of all of them, and `%quickref` for a reference sheet."
258
+
]
259
+
},
260
+
{
261
+
"cell_type": "code",
262
+
"collapsed": false,
263
+
"input": [
264
+
"%quickref"
265
+
],
266
+
"language": "python",
267
+
"metadata": {},
268
+
"outputs": [],
269
+
"prompt_number": 5
270
+
},
271
+
{
272
+
"cell_type": "markdown",
273
+
"metadata": {},
274
+
"source": [
275
+
"You can also do nutty things like run Perl code in the notebook with cell magics. This is especially cool for things like Cython code, where you can try out Cython really fast with the `%%cython` magic (you'll need to install it)."
0 commit comments