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 decchar handling in writecell() for AbstractFloat #1109

Merged
merged 4 commits into from
Oct 19, 2024

Conversation

sara2512
Copy link
Contributor

This PR fixes #1108.

Currently DecFP.Dec64 Floats are not handled correctly. Decimal character is not replaced.

using DecFP
using DataFrames
using CSV
io = IOBuffer() 
CSV.write(io, DataFrame(:a => Dec64(1)); decimal = ',')
String(take!(io))
# "a\n1.0\n"

With the PR in place the result is as expected.

CSV.write(io, DataFrame(:a => Dec64(1)); decimal = ',')
String(take!(io))
# "a\n1,0\n"

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.47%. Comparing base (80936af) to head (a05e45f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/write.jl 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1109      +/-   ##
==========================================
+ Coverage   90.27%   90.47%   +0.19%     
==========================================
  Files           9        9              
  Lines        2314     2319       +5     
==========================================
+ Hits         2089     2098       +9     
+ Misses        225      221       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@quinnj quinnj merged commit e84bd71 into JuliaData:main Oct 19, 2024
10 of 11 checks passed
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.

Keyword decimal not respected for AbstractFloats in CSV.write()
2 participants