Model.set_cursor

In [ ]:
Model.set_cursor(cursor)

Sets a new DB cursor. It can be very usefull if the connection to the DB is lost.

Parameters

Name Type Optional Description
cursor
DBcursor
❌
New cursor.

Returns

model : self

Example

In [2]:
from verticapy.learn.cluster import KMeans
from verticapy import *
model = KMeans(name = "public.kmeans_iris")
cursor = vertica_conn("VerticaDSN").cursor()
model.set_cursor(cursor)