Added errors{'raise','ignore'} for keys not found in meta for json_normalize
State: closed

Continuation of https://github.com/pandas-dev/pandas/pull/14505

Added errors{'raise','ignore'} for keys not found in meta for json_normalize

Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14583?src=pr) is 85.26% (diff: 100%)
> Merging [#14583](https://codecov.io/gh/pandas-dev/pandas/pull/14583?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

```diff
@@             master     #14583   diff @@
==========================================
  Files           144        144          
  Lines         50980      50985     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43470      43474     +4   
- Misses         7510       7511     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [14e4815...701c140](https://codecov.io/gh/pandas-dev/pandas/compare/14e4815391dcd8c9fe91479fed629410bf63ca33...701c14092267425542aa8eb367298c035d9e8610?src=pr)
Cleaning it up, should be better now. Is there a new whatsnew file so I can add the comments? What's the next version number?

Why is nobody merging this?

@dickreuter we have 107 open PR's. very few people do code review. simply ping if you want someone to look.

@dickreuter just so you know: we don't get notifications when you push new code, only from comments. So it's always good to put a comment after you pushed new code to indicated that you updated. And as @jreback says, pinging like you now did always helps

Ok great. Please have a look. I think this can now be merged. 

@dickreuter Did you push the changes? As there is still a merge conflict and there is no new commit since @jreback 's comments

Just pushed the changes as instructed.

Anything else I need to fix in this or can this be merged?
Just did another rebase and pushed again. Can this be merged now? thanks
just some doc comments, otherwise lgtm.
Implemented doc amendments as suggested. Let me know if anything else needs to be changed. thanks
@dickreuter You still have some style issues (that's the reason that travis is failing). You can always look in the log of the third travis build to see the issues (https://travis-ci.org/pandas-dev/pandas/jobs/182143127, scroll to the bottom):

```
Linting  *.py
pandas/io/json.py:750:1: W293 blank line contains whitespace
pandas/io/json.py:857:80: E501 line too long (81 > 79 characters)
pandas/io/json.py:858:80: E501 line too long (85 > 79 characters)
pandas/io/tests/json/test_json_norm.py:229:5: E303 too many blank lines (2)
pandas/io/tests/json/test_json_norm.py:266:80: E501 line too long (81 > 79 characters)
pandas/io/tests/json/test_json_norm.py:267:80: E501 line too long (87 > 79 characters)
pandas/io/tests/json/test_json_norm.py:269:17: E225 missing whitespace around operator
pandas/io/tests/json/test_json_norm.py:270:10: E128 continuation line under-indented for visual indent
pandas/io/tests/json/test_json_norm.py:271:10: E128 continuation line under-indented for visual indent
pandas/io/tests/json/test_json_norm.py:272:10: E128 continuation line under-indented for visual indent
pandas/io/tests/json/test_json_norm.py:273:10: E128 continuation line under-indented for visual indent
pandas/io/tests/json/test_json_norm.py:278:17: E128 continuation line under-indented for visual indent
pandas/io/tests/json/test_json_norm.py:278:80: E501 line too long (86 > 79 characters)
pandas/io/tests/json/test_json_norm.py:279:28: E127 continuation line over-indented for visual indent
pandas/io/tests/json/test_json_norm.py:279:80: E501 line too long (87 > 79 characters)
Linting *.py DONE
```

(it also a good idea to set up your IDE to warn for this)
I believe this is fixed now. Some checks are still not successful but I can't find any reason why. Any suggestions why? All it says is:

The command "ci/lint.sh" exited with 1.
0.00s$ echo "script done"
script done
git diff master | flake8 -diff
@dickreuter You can also always look at the third travis build (https://travis-ci.org/pandas-dev/pandas/jobs/183014087, scroll to bottom), which says "pandas/io/json.py:857:45: E211 whitespace before '('"
Linting still seems to fail, even though when I do "git diff master | flake8 --diff" I only get problems in v0.20.0.txt, all the rest is fine. Any suggestions how I can find the remaining issues? 

@dickreuter It was not linting this time, the mac build failed.
And it is related to my code? I can't find any details. 
@dickreuter you need to rebase on master

``git rebase -i origin/master`` then
``git push -f``
Now all checked have passed.
thanks!