Open davetapley opened 3 months ago
Thanks for the request. I'm open to the addition of an errors
argument as in read_csv, provided the implementation is straight forward (I haven't checked). If this causes anything more than negligible complexity in the algorithm however, I think we should cautiously reevaluate it.
take
@davetapley One clarifying question: it seems like read_csv
has an option to specify what to do when encountering the bad line, but the bad line means a line with too many fields, not the line with non-parseable value documentation. Could you clarify what your expectation is? Also, Could you try your example again? I couldn't reproduce your issue with the same error. Thanks!
@davetapley Also, this seems more of the issue with the data not the XML parser itself since --999
can't be a float. Is your request to have a custom error handling with these data conversion errors?
Feature Type
[X] Adding new functionality to pandas
[ ] Changing existing functionality in pandas
[ ] Removing existing functionality in pandas
Problem Description
Be able to
read_xml
and skip non-parseable lines.E.g.
With:
If I:
I get:
Feature Description
https://github.com/pandas-dev/pandas/issues/15122 but for
read_xml
Alternative Solutions
read_xml
with nodtype
kwarg, and manually manipulate the DataFrame afterwards.Additional Context
No response