Skip to content

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"

@codecov
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
quinnj added a commit that referenced this pull request Jan 12, 2026
* fix decchar handling in writecell() for AbstractFloat

* test for #1109 fix decchar handling in writecell() for AbstractFloat

* fix newline format

---------

Co-authored-by: Jacob Quinn <quinn.jacobd@gmail.com>
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