I have a function used to make parent-child relationships in smartsheet.
The child_df contains the row and parent info, when I call update rows, it reads my row ID to update (row.id) and if I pass in the argument row.to_bottom = True it also works, but it stubbornly doesn't assign a parent ID when I pass parentId into the row.
When I removed the row and added the row with only a parentId specified, it gave me an error that it required at least one location specifier (which parentId should be one).
Code below:
for i in range(0,len(child_df)):
row = smartsheet_API.models.Row()
row.parentId = child_df.iloc[i]['Parent']
row.id = child_df.iloc[i]['Row']
row.cells = [{'column_id': column_map[source_column],
'value': self.convert(source_df.loc[i, source_column],source_column)}
for source_column in source_df.columns.values]
new_rows.append(row)
response = self.ss_API.Sheets.update_rows(sheet_id,new_rows)