你好,
在运行脚本的其余部分之前,我需要检查列是否仅包含整数,但我不知道该怎么做。 理想情况下,我希望能够准确识别具有十进制值的行。
在此先感谢您的帮助!
见最后一行。
Names Default to Here( 1 );
// generate test case with a mix of 90% integers and 10% non-integers
data = J( 30, 1,
If( Random Uniform() < 0.1,
Random Normal(),
Random Integer( -6, 6 )
);
);
// check results
Show( data );
// make a data table example
dt = New Table( "Test Cases",
New Column( "Data", Numeric, Continuous,
Values( data )
)
);
// now the solution
nonIntegersHere = dt << Get Rows Where( Modulo( :Data, 1 ) );