Open PanYangyi opened 1 year ago
This is actually correct since asDoubleColumn
is intended to produce doubles for the categories of the string column, not for its actual string values. This becomes clearer with this modified example:
@Test
public void test000() {
DoubleColumn doubleColumn = DoubleColumn.create("year", 2022.0, 2022.0, 2023.0);
StringColumn stringColumn = doubleColumn.asStringColumn();
System.out.println(stringColumn.print());
DoubleColumn asDoubleColumn = stringColumn.asDoubleColumn();
System.out.println(asDoubleColumn.print());
}
yielding
Column: year strings
2022.0
2022.0
2023.0
Column: year strings
0
0
1
To transform the string values back to doubles, use parseDoubles()
on the StringColumn.
use parseDoubles()
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
hi~,您好。tablesaw 非常的棒,但是在使用tablesaw过程中遇见了一些问题,希望能够给予帮助。 问题描述: 因为doubleColunm不能splitOn,所以我将doubleColunm as stringColumn后进行了分组切片,最后将stringColumn还原成doubleColumn的时候,值却出现了问题。 code :
输出: Column: year strings 2022.0 2022.0
Column: year strings 0 0
再次表示感谢🙏