pandas read_xml - handling nested nodes beyond level 2
I am using Pandas to import xml files into a Postgres database via the .read_xml() and .to_sql() functions. With two levels of nested elements in my xml files, things work as I expect: <table1> <id>1</id> <label>Label 1</label> <id>2</id> <label>Label 2</label> </table1> However, I am having issues managing files with more than 2 levels of nested elements: <table1> <id>1</id> <label>Label 1</label> <nested_data> <level_3>nested data 1</level_3> </nested_data> <id>2</id> <label>Label 2</label> <nested_data> <level_3>nested data 2</level_3> </nested_data> </table1> When I load my more complex xm
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.