Package to convert xml to Pandas dataframe (flattens each and every xml element to dataframe column)
Project description
XML to Pandas Dataframe
Flattens out nested xml to individual columns in dataframe
Sample input.xml
<title lang="en">Everyday Italian</title> Giada De Laurentiis 2005 30.00 <title lang="en" language="hello">Harry Potter</title> J K. Rowling Praveen Pathan india india1 2005 29.99 <title lang="en">Learning XML</title> Erik T. Ray 2003 39.95df = xml_to_df.convert_xml_to_df("input.xml")
df.head()
Output dataframe
category | lang | title | author | year | price | language | cricketer1 | cricketer2 | country |
---|---|---|---|---|---|---|---|---|---|
COOKING | en | Everyday Italian | Giada De Laurentiis | 2005 | 30.00 | NaN | NaN | NaN | NaN |
CHILDREN | en | Harry Potter | J K. Rowling | 2005 | 29.99 | hello | Praveen | Pathan | [india, india1] |
WEB | en | Learning XML | Erik T. Ray | 2003 | 39.95 | NaN | NaN | NaN | NaN |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xml_to_df-0.0.3.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file xml_to_df-0.0.3.tar.gz
.
File metadata
- Download URL: xml_to_df-0.0.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6fec2ba4ec32d6cc2b4fd474deb9732090b96f889de55c9d6dd1dad8e0be07 |
|
MD5 | 51ac71425517cec7313fa38ddf3314a8 |
|
BLAKE2b-256 | c8bdcf0982607700b28c2bb6de836d04765ae1403047df9317cb0a54350b492b |
File details
Details for the file xml_to_df-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: xml_to_df-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd22418bf40c8ae8ab7d6bf9c5162c4188d7cd56c23aef57dea5f1d8f61c632d |
|
MD5 | 8438cd5e22e39dece6f0df40ea69f401 |
|
BLAKE2b-256 | ee39a1f7326576f8574e5621ddccd2cd1afce7a53e7fcfe19313b4d22e9d00c8 |