[b]"What's the best way to read XML in Python? Need help parsing!"[/b] or [b]"How do I read XML files in Python ef

20 Replies, 1649 Views

For *read xml python*, I’d say avoid reinventing the wheel. ET is solid, but if you’re lazy (like me), `pandas.read_xml()` is a thing now.

```python
import pandas as pd
df = pd.read_xml('file.xml')
```
Bam. XML to DataFrame. Magic.

Messages In This Thread



Users browsing this thread: 1 Guest(s)