Skip to content

Commit

Permalink
More corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Jan 7, 2025
1 parent daabee4 commit eaaa953
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions synapseclient/models/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,14 +1147,14 @@ def set_columns(
**Warning**: This will act as a destructive operation if your Table class
instance has interacted with Synapse via a `.get()` or `.store()` operation.
The columns you pass in will replace all columns in the table with the columns
in the list. If you
in the list.
In order to rename a column you should change the name attribute of the Column
object rather than call this function. The next time you store the table the
column will be updated in Synapse with the new name and the key in the
`.columns` OrderedDict will be updated. See examples on the Table class for
more information.
If you'd like to rename a column you should change the name attribute of the
Column object rather than call this function. The next time you store the table
the column will be updated in Synapse with the new name and the key in the
`.columns` OrderedDict will be updated. See the example labeled
`Rename an existing column` on the Table class for more information.
Arguments:
columns: The new columns to replace the existing columns with. This may be:
Expand All @@ -1177,7 +1177,7 @@ def set_columns(
table = Table(
id="syn1234"
).get()
).get(include_columns=True)
columns = [
Column(name="my_string_column", column_type=ColumnType.STRING),
Expand All @@ -1202,7 +1202,7 @@ def set_columns(
table = Table(
id="syn1234"
).get()
).get(include_columns=True)
columns = {
"my_string_column": Column(column_type=ColumnType.STRING),
Expand All @@ -1225,7 +1225,7 @@ def set_columns(
table = Table(
id="syn1234"
).get()
).get(include_columns=True)
columns = OrderedDict({
"my_string_column": Column(column_type=ColumnType.STRING),
Expand Down

0 comments on commit eaaa953

Please sign in to comment.