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

New fmtifnum DSL function; make fmtnum/fmtifnum recursive over maps and arrays #946

Merged
merged 7 commits into from
Feb 15, 2022

Conversation

johnkerl
Copy link
Owner

More at

TL;DR

$ mlr --c2p --from docs/src/example.csv put '$* = fmtifnum($*, "%.6f")'
color  shape    flag  k         index     quantity  rate
yellow triangle true  1.000000  11.000000 43.649800 9.887000
red    square   true  2.000000  15.000000 79.277800 0.013000
red    circle   true  3.000000  16.000000 13.810300 2.901000
red    square   false 4.000000  48.000000 77.554200 7.467000
purple triangle false 5.000000  51.000000 81.229000 8.591000
red    square   false 6.000000  64.000000 77.199100 9.531000
purple triangle false 7.000000  65.000000 80.140500 5.824000
yellow circle   true  8.000000  73.000000 63.978500 4.237000
yellow circle   true  9.000000  87.000000 63.505800 8.335000
purple square   false 10.000000 91.000000 72.373500 8.243000

@johnkerl johnkerl merged commit bb95f37 into main Feb 15, 2022
@johnkerl johnkerl deleted the fmtifnum branch February 15, 2022 04:57
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.

1 participant