DOC: Cookbook Inline Examples 2014Q3
State: closed

 As per Joris's guidance, this PR is only partially completed. I fully intend to add more.   It might be a week or two, possibly more, until i'm finished. 

I'll squash it all into one commit when I think I'm done and ready for final review.  Feel free to make suggestions as I go, but consider it all a draft until I squash.

Addresses #6918


Labels:
name: Docs

Comments:
Guys, I set out with good intentions to do a comprehensive update to all the examples cited, but I couldn't finish it all.  I condensed/cleaned some, expanded on others.  

Edit: Remove reference/question about 0.15 ship date.

...fwiw, this is my first OS project I ever (attempted to) contribute to.

Edit: Remove reference about 0.15 ship date.

Maybe it's best if I always squash all my work more frequently(?).  

It's ready to be merged, with the exception of trivial/subjective style details.

I don't see myself having time in the next week to work on this.  After that, I might.  But, I could just as easily work on something else.  It would be a shame if I missed the "October 0.15.1" ship date, which could easily slip by me.

@jnmclarty Thanks a lot for this, it really is a useful contribution. The 0.15 release candidate is releases, so new features aren't merged anymore for 0.15, but for docs it is not a problem to still include this in 0.15. 
I will try to merge one of the coming days (and if necessary fix some trivial style issues). 

I squashed 8 more in-line examples, all inside the "Grouping" section of the doc.  It's again, ready to be merged, excluding subjective style improvements.

can u posts an updated rendering of this?

That most recent rendering, is the latest.  

https://cloud.githubusercontent.com/assets/6062071/4587889/ee0cfff4-5034-11e4-8720-431be6211275.png

maybe add a note at the top that the links are an adjust to the in-line examples and go to SO posts?

on the if-none-else you can add an example using pandas `.where` too!

line '[26]' the critier doesn't show up in sphix for some reason (I don't think function definitions do), just delete it

starting on line `[35]` in your example, setting the panel by transposing. This can actually be done now directly, BUT, you need to be careful about what you are assigning It has to have the shape as `pf.loc[:,:,'D']` for example (and the example does not)

regarding line [26], the output does not show up because of the `;`

@jnmclarty it might make sense to add a 3-rd level to the menu where appropriate, e.g. use sub-headings that are underlines by '******' Then the title of that sub-section will appear on the menu.

@jorisvandenbossche ?

I think I did everything you guys asked.  Want me to squash?

![pandascookbook2](https://cloud.githubusercontent.com/assets/6062071/4599841/3bb11bc2-50cc-11e4-96e4-870eda9ef0b8.png)

your last link to an image of the docs does not work.

I have no time this weekend to look at it in more detail, but it is looking good, so good for me to merge.

No idea why the image doesn't work. It is large, resolution wise (but just 3Mb size wise).  I'm just dragging and dropping the png to chrome.  Going to squash now...

Ready to merge.  FWIW, Here's another try at uploading a shot of the latest rendering: 

![pandascookbook3](https://cloud.githubusercontent.com/assets/6062071/4600281/d70a6a24-50d1-11e4-8468-ba018772b637.png)

just the link:  https://cloud.githubusercontent.com/assets/6062071/4600281/d70a6a24-50d1-11e4-8468-ba018772b637.png

and via google url shorterner:  http://goo.gl/fNh2AD

Imgur won't work, the resolution is too long for their service.

@jnmclarty ok going to merge

have a look at the docs once built

you may need to issue another for for corrections (and further examples if u want)
well leave the issue open for the time being

I'll take a look at the built docs and see if I find anything that needs updating

thanks

Will do.

...ended up having more time this evening. I reviewed the Travis build. Found a problem I need guidance on, and of course a couple other finer details to touch up.

So...I'll put these note below, but really they apply to another PR coming soon.

# Unresolved, but with work around.

## ExpandingApply

The travis build didn't render the results from the expandingapply the same as my machine.  Need advice on this. I pulled, rebuilt, and used 0.15.0rc to render, and it still didn't render the same as the travis build.  Any ideas?

For now, I just took the results, and hardcoded it.  So, to the reader, this issue is resolved.

### My Build

![expandingapply](https://cloud.githubusercontent.com/assets/6062071/4600777/bb5549ba-50dc-11e4-8ab2-decc533832db.png)

### Travis Build

![expandingapply problem](https://cloud.githubusercontent.com/assets/6062071/4600786/14156800-50dd-11e4-85fb-c4c47b4fe163.png)

# Resolved

## Extra AllCrit;

Noticed that there were two cases of "AllCrit_;_", and I only deleted the one you guys pointed to.  Resolved by deleting the second one.

## Missing Render of line 565 - 569

For some reason sphinx didn't render three key lines.  I solved it by changing the structure of the function and re-typing it. I think sphinx got confused by the double indent on the final 'return', or I had a tab somewhere.

## Missing Render of line 659 - 662

It did it here too.  I resolved by creating a second notebook break and shrugged my shoulders.

## Spaces and Tabs

It appears that I, and the previous authors, were sloppy with tabs/spaces.  I replaced all with spaces.