Add pandas cookbook to tutorials (for #5837)
State: closed

@jreback asked me to add something like this in https://github.com/jvns/pandas-cookbook/issues/1

I haven't been able to test that this displays correctly as I can't figure out how to build the Sphinx docs.

If someone can tell me how to build the docs, I can test it.

```
bork@kiwi ~/c/p/pandas> pwd
/home/bork/clones/pandas/pandas
bork@kiwi ~/c/p/pandas> python ../doc/make.py html
Error: Cannot find source directory.
Building HTML failed
```

```
bork@kiwi ~/c/p/doc> pwd
/home/bork/clones/pandas/doc
bork@kiwi ~/c/p/doc> python make.py html
Running Sphinx v1.1.3
cannot import name hashtable
Exception occurred while building, starting debugger:
Traceback (most recent call last):
  File "/opt/anaconda/lib/python2.7/site-packages/sphinx/cmdline.py", line 188, in main
    warningiserror, tags)
  File "/opt/anaconda/lib/python2.7/site-packages/sphinx/application.py", line 102, in __init__
    confoverrides or {}, self.tags)
  File "/opt/anaconda/lib/python2.7/site-packages/sphinx/config.py", line 216, in __init__
    exec code in config
  File "/home/bork/clones/pandas/doc/source/conf.py", line 74, in <module>
    import pandas
  File "/home/bork/clones/pandas/pandas/__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: cannot import name hashtable
> /home/bork/clones/pandas/pandas/__init__.py(6)<module>()
-> from . import hashtable, tslib, lib
```


Labels:

Comments:
 That error usually means that you haven't built the C extensions yet. To
fix it, you need to go into the pandas directory and run `make build`. (top
level directory, not the docs directory)

After that you should be able to use `python make.py html`. (you may get a
few errors about latex or R that you can safely ignore)

Thanks! The reST should be right now.

@jvns I'm definitely interested in including this, but I'm concerned that, by referring to an nbviewer on a link to the raw file in Github, these links are going to be fragile.  Maybe you could put this up on a GH-pages repo or on your own domain and then link to them?

yup, that's a good point. could either
- just link to the github repository
- link to the nbviewer chapters, but with a tagged release instead of master
  On Jan 4, 2014 1:07 AM, "Jeff Tratner" notifications@github.com wrote:

> @jvns https://github.com/jvns I'm definitely interested in including
> this, but I'm concerned that, by referring to an nbviewer on a link to the
> raw file in Github, these links are going to be fragile. Maybe you could
> put this up on a GH-pages repo or on your own domain and then link to them?
> 
> —
> Reply to this email directly or view it on GitHubhttps://github.com/pydata/pandas/pull/5842#issuecomment-31572499
> .

@jvns

I would also like to include some of the other links in the issue , with a sentence or so about each

of course trying to be non-duplicative about this page

feel free to reorganize the page as needed

goal is to try to have multiple different tutorials that have some overlap

A link to a tagged release would be permanent for sure and would accomplish the goal, though personally I'd prefer linking to an actual web address that can be updated. Your call.

Could you shorten this by maybe removing the chapter names and just linking the descriptions? The descriptions appear to be what the chapter actually explains which is what we need here so it can be concise.

Okay, how's this? I've linked to the v0.1 tag for each chapter, as well as the github repository with an up-to-date table of contents.

thanks @jvns 
merged this...pls take a look after 5pm today,...
changes/additions welcome!

@y-p put up the dev docs .... 

seems your first link is broken? (rest seem ok)

http://pandas.pydata.org/pandas-docs/dev/tutorials.html#pandas-cookbook