如何划分栏目和栏目中的数据,我附呈以供参考。
范例:列cement_water的值为302; 203.0,必须拆分为两列,分别命名为cement和water,值为302.0和203.0。列值具有不同的delimeter(;,_),必须处理,并且值具有字符串数据,必须使用word to number转换为数值。
Previous/Default such columns:
cement_water coarse_fine_aggregate
three hundred and two;203.0 974.0,817.0
one hundred and fifty-one;184.4 992.0;815.9
three hundred and sixty-two_164.9 944.7;755.8
Has to be converted into the following:
cement water coarse_aggregate fine_aggregate
302.0 203.0 974.0 817.0
151.0 184.4 992.0 815.9
362.0 164.9 944.7 755.8
个字符
错误-找不到有效的数字字!请输入有效的数字字(例如:二百二十三万零四十九)
1条答案
按热度按时间gk7wooem1#
这对我来说是一个很好的方法,使用这个变体:
字符串
输出量:
型
更多通用代码,并提供额外示例
在这里,
cement_water
中混合了字符串和数字,让我们首先识别数字并只解析字符串:型
输出量:
型