DOC: Added a Multi Index example for the Series.sum method
State: closed

Added a simple example of using the sum method on a multi-indexed series.

- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Labels:
name: Docs

Comments:
Hello @vadakattu! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/generic.py`](https://github.com/vadakattu/pandas/blob/91fad75c0b9c99a15adf0dc6a6cd1e0247bdc1b1/pandas/core/generic.py) !


cc @datapythonista 
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=h1) Report
> Merging [#23279](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0a2d5019dc2b8f9521879f47a197076d9cef38ce?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23279/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23279   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files         169      169           
  Lines       50924    50924           
=======================================
  Hits        46968    46968           
  Misses       3956     3956
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.65% <ø> (ø)` | :arrow_up: |
| #single | `42.28% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/23279/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.79% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=footer). Last update [0a2d501...d3e07bf](https://codecov.io/gh/pandas-dev/pandas/pull/23279?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Travis failure seems to be a code coverage timeout while uploading the second report, `/tmp/cov-multiple.xml`. Should I submit an empty commit to rerun the test suite?
```Travis CI detected.
    project root: .
    Fixing merge commit SHA
    Yaml found at: codecov.yml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + TRAVIS_OS_NAME
    + TRAVIS_PYTHON_VERSION
==> Reading reports
    + /tmp/cov-multiple.xml bytes=2000278
==> Appending adjustments
    http://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=649fd4c37bee8af43ff6ae0eec78f1a524a49f7b&build=45600.4&build_url=&name=&tag=&slug=pandas-dev%2Fpandas&service=travis&flags=multiple&pr=23279&job=445227336
    -> Pinging Codecov
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
The job exceeded the maximum time limit for jobs, and has been terminated.
you can merge master into your branch and push, that's what we usually do (equivalent to an empty commit)
I think it's worth using from_product in the example:
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.from_product.html
> I think it's worth using from_product in the example:
> https://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.from_product.html

Oh nice! Didn't know about that, will update.
It seemed ok with `git diff upstream/master -u -- "*.py" | flake8 --diff` but I've reformatted nonetheless -- is this indentation better?
Thanks @vadakattu