Python: Extracting XML to DataFrame (Pandas)
问题 a have an XML file that looks like this: <?xml version="1.0" encoding="utf-8"?> <comments> <row Id="1" PostId="2" Score="0" Text="(...)" CreationDate="2011-08-30T21:15:28.063" UserId="16" /> <row Id="2" PostId="17" Score="1" Text="(...)" CreationDate="2011-08-30T21:24:56.573" UserId="27" /> <row Id="3" PostId="26" Score="0" Text="(...)" UserId="9" /> </comments> What I'm trying to do is to extract ID, Text and CreationDate colums into pandas DF and I've tryied following: import xml.etree