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 DATA is renamed to DATA2 and then back to DATA again..

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 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

Updated daily during alpha development.