set_uid
cellseg_gsontools.set_uid(gdf, start_ix=0, id_col='uid', drop=False)
¶
Set a unique identifier column to gdf.
Note
by default sets a running index column to gdf as the uid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gdf |
GeoDataFrame
|
Input Geodataframe. |
required |
start_ix |
int, default=0
|
The starting index of the id column. |
0
|
id_col |
str, default="uid"
|
The name of the column that will be used or set to the id. |
'uid'
|
drop |
bool, default=False
|
Drop the column after it is added to index. |
False
|
Returns:
Type | Description |
---|---|
GeoDataFrame
|
gpd.GeoDataFrame: The input gdf with a "uid" column added to it. |
Examples: