sjsrey / stars

Space-Time Analysis of Regional Systems
BSD 2-Clause "Simplified" License
11 stars 18 forks source link

iPython notebook for pandas intro #9

Closed darribas closed 12 years ago

darribas commented 12 years ago

I've added to the repo an iPython notebook instead of the script for the example of this morning. It's both in its original format (ipynb) and converted into html. Please let me know if you can open the html. If you want to keep playing and extend it or simply visualize it, you'll need iPython (fairly recent version) and the dependencies for the notebook functionality (see here http://ipython.org/ipython-doc/dev/install/install.html#installnotebook).

pastephens commented 12 years ago

I installed the following packages, after upgrading ipython to 0.12:

pandas pexpect pyzmq tornado readline

What am I missing?

dev-presentations git:(master) ipython pandas-demo.ipynb /Library/Python/2.7/site-packages/ipython-0.12-py2.7.egg/IPython/utils/path.py:417: UserWarning: Found old IPython config file u'/Users/stephens/.ipython/ipy_user_conf.py' (modified by user) warnings.warn("Found old IPython config file %r (modified by user)"%f) /Library/Python/2.7/site-packages/ipython-0.12-py2.7.egg/IPython/utils/path.py:417: UserWarning: Found old IPython config file u'/Users/stephens/.ipython/ipythonrc' (modified by user) warnings.warn("Found old IPython config file %r (modified by user)"%f) /Library/Python/2.7/site-packages/ipython-0.12-py2.7.egg/IPython/utils/path.py:429: UserWarning: The IPython configuration system has changed as of 0.11, and these files will be ignored. See http://ipython.github.com/ipython-doc/dev/config for details of the new config system. To start configuring IPython, do ipython profile create, and edit ipython_config.py in /profile_default. If you need to leave the old config files in place for an older version of IPython and want to suppress this warning message, set c.InteractiveShellApp.ignore_old_config=True in the new config.

c.InteractiveShellApp.ignore_old_config=True in the new config.""")

NameError Traceback (most recent call last) /Library/Python/2.7/site-packages/ipython-0.12-py2.7.egg/IPython/utils/py3compat.pyc in execfile(fname, where) 173 else: 174 filename = fname --> 175 builtin.execfile(filename, where)

/Users/stephens/code/stars/docs/dev-presentations/pandas-demo.ipynb in () 17 { 18 "cell_type": "code", ---> 19 "collapsed": true, 20 "input": [ 21 "import pandas as pd",

NameError: name 'true' is not defined ➜ dev-presentations git:(master)

darribas commented 12 years ago

Start the notebook from the command line with 'ipython notebook --pylab inline'. This will bring up the gui in your browser. Select the ipynb file from there and you should have direct access.

]d[

Daniel Arribas-Bel, PhD. Url: darribas.org Mail: darribas@asu.edu

GeoDa Center for Geospatial Analysis and Computation (geodacenter.asu.edu)

Arizona State University (USA)