Skip to content

read_html leading zero problem #11994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Matt2520 opened this issue Jan 7, 2016 · 1 comment
Closed

read_html leading zero problem #11994

Matt2520 opened this issue Jan 7, 2016 · 1 comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request IO HTML read_html, to_html, Styler.apply, Styler.applymap

Comments

@Matt2520
Copy link

Matt2520 commented Jan 7, 2016

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?

@jreback
Copy link
Contributor

jreback commented Jan 7, 2016

dupe of #10534

we are not passing thru the dtype argument to enable this.

you can certainly do this on post processing if you wanted. by doing an astype(object)

@jreback jreback closed this as completed Jan 7, 2016
@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request IO HTML read_html, to_html, Styler.apply, Styler.applymap labels Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
Development

No branches or pull requests

2 participants