Skip to content

Commit

Permalink
Allow for join between two multi-index dataframe instances
Browse files Browse the repository at this point in the history
  • Loading branch information
harisbal authored and harisbal committed Mar 17, 2018
1 parent c857b4f commit 8e5fcf1
Show file tree
Hide file tree
Showing 52 changed files with 2,655 additions and 927 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dist
.coverage
coverage.xml
coverage_html_report
*.pytest_cache

# OS generated files #
######################
Expand Down Expand Up @@ -90,7 +91,6 @@ scikits

# Unit / Performance Testing #
##############################
.pytest_cache/
asv_bench/env/
asv_bench/html/
asv_bench/results/
Expand Down
Binary file modified doc/cheatsheet/Pandas_Cheat_Sheet.pdf
Binary file not shown.
Binary file modified doc/cheatsheet/Pandas_Cheat_Sheet.pptx
Binary file not shown.
86 changes: 48 additions & 38 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ changes in this branch specific to one bug or feature so it is clear
what the branch brings to *pandas*. You can have many shiny-new-features
and switch in between them using the git checkout command.

To update this branch, you need to retrieve the changes from the master branch::
When creating this branch, make sure your master branch is up to date with
the latest upstream master version. To update your local master branch, you
can do::

git fetch upstream
git rebase upstream/master
git checkout master
git pull upstream master --ff-only

This will replay your commits on top of the latest pandas git master. If this
leads to merge conflicts, you must resolve these before submitting your pull
request. If you have uncommitted changes, you will need to ``stash`` them prior
to updating. This will effectively store your changes and they can be reapplied
after updating.
When you want to update the feature branch with changes in master after
you created the branch, check the section on
:ref:`updating a PR <contributing.update-pr>`.

.. _contributing.documentation:

Expand Down Expand Up @@ -964,32 +964,6 @@ Now you can commit your changes in your local repository::
git commit -m
Combining commits
-----------------
If you have multiple commits, you may want to combine them into one commit, often
referred to as "squashing" or "rebasing". This is a common request by package maintainers
when submitting a pull request as it maintains a more compact commit history. To rebase
your commits::
git rebase -i HEAD~#
Where # is the number of commits you want to combine. Then you can pick the relevant
commit message and discard others.
To squash to the master branch do::
git rebase -i master
Use the ``s`` option on a commit to ``squash``, meaning to keep the commit messages,
or ``f`` to ``fixup``, meaning to merge the commit messages.
Then you will need to push the branch (see below) forcefully to replace the current
commits with the new ones::
git push origin shiny-new-feature -f
Pushing your changes
--------------------
Expand Down Expand Up @@ -1045,15 +1019,51 @@ release. To submit a pull request:
#. Click ``Send Pull Request``.
This request then goes to the repository maintainers, and they will review
the code. If you need to make more changes, you can make them in
your branch, push them to GitHub, and the pull request will be automatically
updated. Pushing them to GitHub again is done by::
the code.
.. _contributing.update-pr:
git push -f origin shiny-new-feature
Updating your pull request
--------------------------
Based on the review you get on your pull request, you will probably need to make
some changes to the code. In that case, you can make them in your branch,
add a new commit to that branch, push it to GitHub, and the pull request will be
automatically updated. Pushing them to GitHub again is done by::
git push origin shiny-new-feature
This will automatically update your pull request with the latest code and restart the
:ref:`Continuous Integration <contributing.ci>` tests.
Another reason you might need to update your pull request is to solve conflicts
with changes that have been merged into the master branch since you opened your
pull request.
To do this, you need to "merge upstream master" in your branch::
git checkout shiny-new-feature
git fetch upstream
git merge upstream/master
If there are no conflicts (or they could be fixed automatically), a file with a
default commit message will open, and you can simply save and quit this file.
If there are merge conflicts, you need to solve those conflicts. See for
example at https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/
for an explanation on how to do this.
Once the conflicts are merged and the files where the conflicts were solved are
added, you can run ``git commit`` to save those fixes.
If you have uncommitted changes at the moment you want to update the branch with
master, you will need to ``stash`` them prior to updating (see the
`stash docs <https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning>`__).
This will effectively store your changes and they can be reapplied after updating.
After the feature branch has been update locally, you can now update your pull
request by pushing to the branch on GitHub::
git push origin shiny-new-feature
Delete your merged branch (optional)
------------------------------------
Expand Down
Loading

0 comments on commit 8e5fcf1

Please sign in to comment.