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

Fix auto-formatting NaN #60

Merged
merged 1 commit into from
Jun 24, 2019
Merged

Fix auto-formatting NaN #60

merged 1 commit into from
Jun 24, 2019

Conversation

darkdragon-001
Copy link
Contributor

@darkdragon-001 darkdragon-001 commented Jun 22, 2019

Current version fails with error

ValueError: cannot convert float NaN to integer

This is because round(float('nan')) does not work. This pull request adds a special check to auto formatter and uses text format for NaN instead (string 'NaN').
Maybe it would be better to display an empty field though (fn = lambda x,**kw: '')?


I would like to open the discussion to implement an additional argument for a NaN-formatter which could be a function to convert Nan to string.

@foutaise foutaise merged commit d5540ac into foutaise:master Jun 24, 2019
@foutaise
Copy link
Owner

Hi @darkdragon-001

Thanks for this PR. I prefer to display an explicit 'NaN' instead of an empty string.
A new release will follow soon.

Best regards.

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 this pull request may close these issues.

2 participants