Skip to content

ENH: Possible to add dtype/converters as arguments for pandas.read_xml() ? #43567

Closed
@soliujing

Description

@soliujing

Is your feature request related to a problem?

I am using pandas lib to read xml for further processes, however a number of columns with leading ZERO are always converted to numbers, so I lost the original data.

Describe the solution you'd like

It would be great to add dtype/converter arguments for pandas.read_xml() to force pandas to interprete certain columns with given dtype/converters.
Just like similar IO read (read_csv, read_html, etc)

read_xml
read_csv

API breaking implications

Probably not, this argument could be optional.

Describe alternatives you've considered

Write my own code to pull data by each xml nodes, which results in very bad performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions