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

format: add nan_rep and null_rep kwargs #190

Closed

Conversation

ChristopherRussell
Copy link

@ChristopherRussell ChristopherRussell commented Feb 11, 2024

Summary

Add arguments to fmt_X methods to control the string representation of nan and null values. I have written test cases but I'm not quite sure how to test the formatting result and looking for advice there.

Checklist

@machow
Copy link
Collaborator

machow commented Feb 12, 2024

Hey, thanks for opening this PR! We should be able to support the nan and null representation, via the WIP sub_missing function (#182).

This is really helpful to see--since it's clear we need to account for nan handling too.

If you have opinions on what the default representation of missing values should be, we'd love your input in the issue.

@machow
Copy link
Collaborator

machow commented May 15, 2024

Thanks for working on this PR -- I'm going to close for now, as the sub_missing method can handle replacing missing values. Note that it replaces both null and nan, but we should be able to support a custom substitutions by adding the more generic sub() method to GT down the road

https://posit-dev.github.io/great-tables/reference/GT.sub_missing.html#great_tables.GT.sub_missing

@machow machow closed this May 15, 2024
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.

None yet

2 participants