-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Add I/O support of XML with pandas.read_xml and DataFrame.to_xml… #39516
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
b67d876
ENH: Add i/o support of XML with pandas.read_xml and DataFrame.to_xml…
ParfaitG 98e3bcd
Merge branch 'master' into read_xml
ParfaitG cd79a06
Refactor code for base classes, add tests, adjust whatsnew entry
ParfaitG 6c06dc2
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG fadcb67
Fixed import_optional_dependency() args
ParfaitG ac5fd3a
Fix fixture and param name collision and check two errors in tests
ParfaitG 25ba341
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 143402a
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 938b0a0
Adjusted tests to handle etree version issues
ParfaitG a92c21e
Add appropriate etree skips in tests
ParfaitG 51f10f2
Remove check for warnings in tests
ParfaitG 3520d58
Adjust code to conform to mypy and docstring validation
ParfaitG 4832562
Add read_xml to TestPDApi test and fix for etree test
ParfaitG 2914c32
Add read_xml to TestPDApi test and fix for etree test
ParfaitG 72d0e93
Replace lxml ImportWarning for ImportError with added tests
ParfaitG 6453f6e
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 8af695e
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG b80b8ce
Adjust fixture for lxml skip and add error validation in tests
ParfaitG a6cfc90
Add conditional skips for envs without lxml
ParfaitG 6c4e0b4
Clean up whatnew rst of rebase issue
ParfaitG a57fd35
Fix unescaped emphasis and wording in read_xml docstring
ParfaitG 16cbcd3
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 23439b4
Add XML section in io.rst and lxml dependency for read_xml in install…
ParfaitG 2effae0
Add section title in whatsnew and tree builder for lxml dependency in…
ParfaitG 878eebe
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 35fa6a6
Clean up merge issue in whatsnew, remove escape in io.rst, adjust exc…
ParfaitG 80d44f9
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG f861d53
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 947840a
Remove redundant try/except and fix default namespace condition
ParfaitG f8dc56c
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG cb34dde
Replace path or buffer handling with get_handle and add compression a…
ParfaitG 3133486
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG a7716b8
Fix issues in tests from other Python envs
ParfaitG 701d225
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 5b93c16
Fix precommit issue with import line
ParfaitG 9a0dfb4
Adjust code and tests per twoertwein comments
ParfaitG 9556035
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 82ac370
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG c478cb0
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG e23200d
Remove redundancy and object names in XML parse and rename tests for …
ParfaitG b0b3759
Resolve merge conflict with upstream/master
ParfaitG b48e257
Add XML table in install.rst
ParfaitG 453ac40
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 9b21636
Streamline filepath_or_buffer handling and add TypeError tests
ParfaitG bea318c
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 49343b1
Fix lxml test on few Python envs
ParfaitG ce986bc
Adjust io handling in context maanger
ParfaitG 347d58b
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG e2f80db
Add and fix tests for special filepath_or_buffer values
ParfaitG c7e1e11
Fix tests for better example and wrong parser
ParfaitG 9790e7c
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG df9ecf4
Adjust to handle empty string stylesheet with tests
ParfaitG 46719b7
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 5d75d51
Move methods out of class, adjust xpath check, and data frame formatting
ParfaitG 66c01d2
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 5c0af6e
Update tests to conform to mypy
ParfaitG 2eae8ad
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 603644e
Import methods to avoid duplication and add typing to parse_doc
ParfaitG 3ec7297
Merge remote-tracking branch 'upstream/master' into read_xml
ParfaitG 6194f83
Refactor code and revert changes to avoid optional module type hints
ParfaitG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
you can probably parametrize these two tests.
In general, I'm not sure whether it is necessary to enforce generic error messages for "obviously" wrong inputs (None/closed files handles). @jreback
One test to add (or extending an existing test) is to make sure that a user-provided file handle is not closed by read/to_xml.
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.
Understood. I can remove those wrong input tests. I tried simulating how users may behave (having answered many StackOverflow pandas answers from newbies!). Will parametrize and add file handle close tests.