Skip to content

DOC: Added a Multi Index example for the Series.sum method #23279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 25, 2018

Conversation

vadakattu
Copy link
Contributor

@vadakattu vadakattu commented Oct 22, 2018

Added a simple example of using the sum method on a multi-indexed series.

  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

@pep8speaks
Copy link

Hello @vadakattu! Thanks for submitting the PR.

@jreback
Copy link
Contributor

jreback commented Oct 23, 2018

cc @datapythonista

@jreback jreback added the Docs label Oct 23, 2018
@codecov
Copy link

codecov bot commented Oct 23, 2018

Codecov Report

Merging #23279 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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% <ø> (ø) ⬆️
#single 42.28% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/generic.py 96.79% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a2d501...d3e07bf. Read the comment docs.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I'm on my phone and can't check whether travis failure is caused by the changes, but happy to merge this on green

@vadakattu
Copy link
Contributor Author

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?

    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.

@datapythonista
Copy link
Member

you can merge master into your branch and push, that's what we usually do (equivalent to an empty commit)

@datapythonista
Copy link
Member

I think it's worth using from_product in the example:
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.from_product.html

@vadakattu
Copy link
Contributor Author

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.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the indentation of the index is correct, if you can make sure that it follows pep8, this looks good to me

@vadakattu
Copy link
Contributor Author

It seemed ok with git diff upstream/master -u -- "*.py" | flake8 --diff but I've reformatted nonetheless -- is this indentation better?

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@WillAyd WillAyd merged commit 8da1b36 into pandas-dev:master Oct 25, 2018
@WillAyd
Copy link
Member

WillAyd commented Oct 25, 2018

Thanks @vadakattu

@vadakattu vadakattu deleted the series-sum branch October 26, 2018 09:47
thoo added a commit to thoo/pandas that referenced this pull request Oct 27, 2018
…ndas

* repo_org/master: (23 commits)
  DOC: Add docstring validations for "See Also" section (pandas-dev#23143)
  TST: Fix test assertion (pandas-dev#23357)
  BUG: Handle Period in combine (pandas-dev#23350)
  REF: SparseArray imports (pandas-dev#23329)
  CI: Migrate some CircleCI jobs to Azure (pandas-dev#22992)
  DOC: update the is_month_start/is_month_end docstring (pandas-dev#23051)
  Partialy fix issue pandas-dev#23334 - isort pandas/core/groupby directory (pandas-dev#23341)
  TST: Add base test for extensionarray setitem pandas-dev#23300 (pandas-dev#23304)
  API: Add sparse Acessor (pandas-dev#23183)
  PERF: speed up CategoricalIndex.get_loc (pandas-dev#23235)
  fix and test incorrect case in delta_to_nanoseconds (pandas-dev#23302)
  BUG: Handle Datetimelike data in DataFrame.combine (pandas-dev#23317)
  TST: re-enable gbq tests (pandas-dev#23303)
  Switched references of App veyor to azure pipelines in the contributing CI section (pandas-dev#23311)
  isort imports-io (pandas-dev#23332)
  DOC: Added a Multi Index example for the Series.sum method (pandas-dev#23279)
  REF: Make PeriodArray an ExtensionArray (pandas-dev#22862)
  DOC: Added Examples for Series max (pandas-dev#23298)
  API/ENH: tz_localize handling of nonexistent times: rename keyword + add shift option (pandas-dev#22644)
  BUG: Let MultiIndex.set_levels accept any iterable (pandas-dev#23273) (pandas-dev#23291)
  ...
thoo added a commit to thoo/pandas that referenced this pull request Oct 27, 2018
…xamples

* repo_org/master: (83 commits)
  DOC: Add docstring validations for "See Also" section (pandas-dev#23143)
  TST: Fix test assertion (pandas-dev#23357)
  BUG: Handle Period in combine (pandas-dev#23350)
  REF: SparseArray imports (pandas-dev#23329)
  CI: Migrate some CircleCI jobs to Azure (pandas-dev#22992)
  DOC: update the is_month_start/is_month_end docstring (pandas-dev#23051)
  Partialy fix issue pandas-dev#23334 - isort pandas/core/groupby directory (pandas-dev#23341)
  TST: Add base test for extensionarray setitem pandas-dev#23300 (pandas-dev#23304)
  API: Add sparse Acessor (pandas-dev#23183)
  PERF: speed up CategoricalIndex.get_loc (pandas-dev#23235)
  fix and test incorrect case in delta_to_nanoseconds (pandas-dev#23302)
  BUG: Handle Datetimelike data in DataFrame.combine (pandas-dev#23317)
  TST: re-enable gbq tests (pandas-dev#23303)
  Switched references of App veyor to azure pipelines in the contributing CI section (pandas-dev#23311)
  isort imports-io (pandas-dev#23332)
  DOC: Added a Multi Index example for the Series.sum method (pandas-dev#23279)
  REF: Make PeriodArray an ExtensionArray (pandas-dev#22862)
  DOC: Added Examples for Series max (pandas-dev#23298)
  API/ENH: tz_localize handling of nonexistent times: rename keyword + add shift option (pandas-dev#22644)
  BUG: Let MultiIndex.set_levels accept any iterable (pandas-dev#23273) (pandas-dev#23291)
  ...
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants