NRAO Home > CASA > CASA Toolkit Reference Manual
table.renamecol - Function

3.2.1 rename a column


Description

A column can be renamed in a table that was opened nomodify=False.
However, renaming is not possible in a (reference) table resulting from a select or sort operation.

Arguments





Inputs

oldname

name of column to be renamed

allowed:

string

Default:

newname

new name of column

allowed:

string

Default:

Returns
bool

Example

 
 
  tb.open("3C273XC1.MS", nomodify=False)  
  tb.renamecol (’DATA’, ’DATA2’)  
# T  
  print tb.colnames()  
  tb.renamecol (’DATA2’, ’DATA’)  
# T  
  print tb.colnames()  
 
Column \texttt{DATA} is renamed to \texttt{DATA2} and then back to  
\texttt{DATA} again..  

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search