-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Only sort dict columns in from_records for py < 3.6 #22687
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
Conversation
Hello @llawall! Thanks for updating the PR.
Comment last updated on September 13, 2018 at 10:03 Hours UTC |
Would at the very least need tests bundled with this, but can you also open an issue to discuss? The existing behavior is an explicit sort, not necessarily an undefined order for Python < 3.6 so it's not as if this is a bug being fixed but rather a behavioral change that could use discussion |
Also, this would be somewhat unique as you have the potential for dicts of different orders in |
@WillAyd :
I've opened #22708 for further discussion about this. Let's move the discussion there. |
Codecov Report
@@ Coverage Diff @@
## master #22687 +/- ##
=======================================
Coverage 92.17% 92.17%
=======================================
Files 169 169
Lines 50715 50715
=======================================
Hits 46747 46747
Misses 3968 3968
Continue to review full report at Codecov.
|
Can you merge master here? |
Sure. I’m away for a few days but will do it on my return. |
closing as stale. if you want to continue, pls ping. |
git diff upstream/master -u -- "*.py" | flake8 --diff
DataFrame.from_records does not respect dictionary order on Python 3.6+. For example:
This change respects dict ordering on Python 3.6+ in line with 0.23 pandas behaviour of constructor and from_dict:
There appears to be further potential to reduce duplication if from_records called from_dict?