Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Deprecating sort=None #6

Open
wants to merge 17 commits into
base: secondtry
Choose a base branch
from
Open

Conversation

lowerthansound
Copy link
Owner

@lowerthansound lowerthansound commented Sep 27, 2018

This commit searches for all locations where sort=None (in practice, where it is ommited) and adds a sort=BOOL in place, correponding to the expected behavior.

We also change the location of old tests and do some quick testing stuff. A bit messy, but will come out nicely

  • Replace places where sort=None by the wanted
  • Understand sort=None code path
  • Create regression tests for sort=None
  • Implement sort=None behavior
  • Lint/Rebase
  • Review

what is that weird matplotlib error?

@lowerthansound lowerthansound force-pushed the secondtry-deprecate branch 2 times, most recently from 6930e09 to 7e2259a Compare September 29, 2018 23:45
araraonline added 17 commits September 30, 2018 13:19
I'm currently organizing all append related tests into this one unique
module. The old tests have not been deleted yet because their location
is kinda useful (for git).
Slowly deprecating sort=None.
I intend to write some regression tests later, or, totally drop the
None behavior if possible.
The behavior of these changed and is already being tested in some new
functions
This method is responsible for `DataFrame.loc[i] = value`. It uses
append in its inner workings.

Though I haven't tested yet, I think that setting sort to False is the
right choice here, because, never would we want to sort the DataFrame
columns when we are just adding some rows.
Function is called by pivot_table
This are all (or almost all) tests that use the method DataFrame.append
and that are not located in concat/append test modules specifically.

So, what we have left to do:

- pandas/tests/reshape/test_concat.py
- pandas/tests/frame/test_combine_concat.py

Both have been transferred to pandas/tests/reshape/test_append.py
(which branch?)
Called during crosstab
@@ -6338,6 +6338,9 @@ def append(self, other, ignore_index=False,
3 3
4 4
"""
if sort is not False and sort is not True:
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove this before merge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant