Skip to content

read_html leading zero problem #11994

Closed
Closed
@Matt2520

Description

@Matt2520

Hi, new to python and pandas, but am trying to work with information off the web that has serial numbers. Many of the numbers have leading zeros which that are important to carry over, but pandas interprets the values as integers and drops the zero. I was trying to change the dtype to str but read_html doesn't have a dtype argument, and it seems like infer_types = False is depricated (or at least I get an exception for unexpected keyword argument). What is the best way to get these zeros back?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsDuplicate ReportDuplicate issue or pull requestIO HTMLread_html, to_html, Styler.apply, Styler.applymap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions