py4cytoscape.tables.rename_table_column
-
rename_table_column
(column, new_name, table='node', namespace='default', network=None, base_url='http://127.0.0.1:1234/v1')[source] Set a new name for a column.
- Parameters
column (str) – Name of the column to rename
new_name (str) – New name for the specified column
table (str) – name of Cytoscape table to load data into, e.g., node, edge or network; default is “node”
namespace (str) – Namespace of table. Default is “default”.
network (SUID or str or None) – Name or SUID of a network. Default is the “current” network active in Cytoscape.
base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://127.0.0.1:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.
- Returns
’’
- Return type
str
- Raises
HTTPError – if table or namespace or table doesn’t exist in network, or if column doesn’t exist in table, or new_name already exists
CyError – if network name or SUID doesn’t exist, or if mapping parameter is invalid
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> rename_table_column('AverageShortestPathLength', 'xAveragex') '' >>> rename_table_column('AverageShortestPathLength', 'xAveragex', table='edge', namespace='default', network='My Network') ''