This should work
dataset[All, All, NumberForm[#, {Infinity, 2}] &]
%[Values[#] & // Normal]
Export["test.csv", %]
which when applied to the following example
dataset = Dataset[{
<|"a" -> 1, "b" -> "xman", "c" -> 1|>,
<|"a" -> 2, "b" -> "bear", "c" -> N[Pi]|>,
<|"a" -> 3, "b" -> "fear", "c" -> 3|>,
<|"a" -> 4, "b" -> "smear", "c" -> 5|>,
<|"a" -> 5, "b" -> "year", "c" -> 7|>,
<|"a" -> 6, "b" -> "ear", "c" -> 12.4335|>}]
gives
\begin{array}{ccc}
1.00,xman,1.00\\
2.00,bear,3.14\\
3.00,fear,3.00\\
4.00,smear,5.00\\
5.00,year,7.00\\
6.00,ear,12.43\\
\end{array}
in the exported file
Update 1
The code update that does not strip the string from quotation marks
ClearAll[tonum]
tonum[x_?NumericQ] := NumberForm[x, {Infinity, 2}]
tonum[x_] := x
Export["test.csv",
Map[tonum, ds[Values] // Normal, {2}]]
and the output is
gives
\begin{array}{ccc}
1.00,"xman",1.00\\
2.00,"bear",3.14\\
3.00,"fear",3.00\\
4.00,"smear",5.00\\
5.00,"year",7.00\\
6.00,"ear",12.43\\
\end{array}
Update 2
It appears that the Export
strips double quotes when the string is Wrapped with NumberForm
. Number form has no effect when displaying string the in front end. I do not know if this is intended behavior of export or a bug.
Export["test.csv", NumberForm[#, {Infinity, 2}] & /@ dataset]
. Can you give some small subset of your dataset to be used as example. $\endgroup$