将列名称设置为大写我正在尝试将所有列名称设置为大写。我已经尝试过以下操作,但它只是将列表更改为大写而不是列。
col_name_list = dt3 << get column names(string);
for (i = 1, i <= nitems(col_name_list), i++,
col_name_list[i] = uppercase(col_name_list[i]);
我需要做什么才能将所有列名称更改为大写?
回复:将列名设置为大写效果很好。谢谢。
回复:将列名设置为大写@wjalford ,
尝试这个 ?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
CurrentCols = dt << Get Column Names("String");
Show(CurrentCols);
for(i = 1, i <= N Items(CurrentCols) , i++,
Column(dt,i) << Set Name(Uppercase(CurrentCols[i]));
);<BR /><BR />NewCols = dt << Get Column Names("String"); <BR /><BR />Show(NewCols); 您走在正确的轨道上,您需要添加的功能是将表中的列名称设置回新的列名称。