vDataFrame.to_shp¶
In [ ]:
vDataFrame.to_shp(name: str,
path: str,
usecols: list = [],
overwrite: bool = True,
shape: str = "Polygon",)
Creates a SHP file of the current vDataFrame relation. These files are exported to the Vertica database.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
name | str | ❌ | Name of the SHP file. |
path | str | ❌ | Absolute path to which to save the SHP file. |
usecols | list | ✓ | vcolumns to select from the final vDataFrame relation. If empty, all the vcolumns will be selected. |
overwrite | bool | ✓ | If set to True, the function will overwrite the index if an index exists. |
shape | str | ✓ | One of the following spatial classes:
|
In [9]:
from verticapy.datasets import load_cities
cities = load_cities()
display(cities)
In [12]:
# Creating the SHP file of the current vDataFrame
# A folder will be created
cities.to_shp("cities",
"/home/dbadmin/",
shape = "Point")