-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
json_normalize: Make code more pythonic and avoid modification of meta if mutable #18610
json_normalize: Make code more pythonic and avoid modification of meta if mutable #18610
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18610 +/- ##
==========================================
- Coverage 91.46% 91.45% -0.02%
==========================================
Files 157 157
Lines 51439 51447 +8
==========================================
- Hits 47051 47049 -2
- Misses 4388 4398 +10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a whatsnew not for 0.21.1
@@ -173,6 +173,20 @@ def test_meta_name_conflict(self): | |||
for val in ['metafoo', 'metabar', 'foo', 'bar']: | |||
assert val in result | |||
|
|||
def test_meta_parameter_not_modified(self): | |||
data = [{'foo': 'hello', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the issue number here
@jreback is it OK now? Thanks. |
thanks! |
…a if mutable (pandas-dev#18610) (cherry picked from commit 2c903d5)
closes itself json_normalize: Make code more pythonic and avoid modification of meta if mutable #18610
tests added / passed
passes
git diff master -u -- "*.py" | flake8 --diff
whatsnew entry
Update json_normalize to prevent modifying
meta
parameter.Make the code more Pythonic too.