Skip to content
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

[Python] Fix read_comparable_areas years available presentation #351

Closed
vss-2 opened this issue Apr 30, 2024 · 1 comment · Fixed by #353
Closed

[Python] Fix read_comparable_areas years available presentation #351

vss-2 opened this issue Apr 30, 2024 · 1 comment · Fixed by #353

Comments

@vss-2
Copy link
Contributor

vss-2 commented Apr 30, 2024

Bug: Python implementation of list_geobr() is missing commas. image

Cause: After solving #348 merging with #349, the field years available of read_comparable_areas() is not comma separated anymore. This is happening specifically on this function because Pandas implementation of read_html() is based on CSV (comma-separated-values) parsing, and given that read_comparables_areas() is the only function with no spaces after commas, Pandas treats like a single value.

@vss-2
Copy link
Contributor Author

vss-2 commented Apr 30, 2024

Solution 1: I expected that using parse_data=True (see docs here) parameter in read_html() would solve, it didn't because of mixing both formats "YYYY, YYYY" and "YYYY,YYYY". I would recommend to format this function on README.md as a possible solution.
Solution 2: Using parameter thousands as '.' (the default is ',') solved the bug, but it doesn't seems good to rely the code on a coincidence:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant