I couldn't find any proper example of how to import a .csv with WKT coordinates (Polygon) in PyQGIS.
Here are more details on my .csv. I am working with polygons. The delimiter is a semi colum, and the name of the variable that contains the relevant coordinates is WKT . Thus I wrote :
1) uri = "data/idf.csv?delimiter=%s&crs=ESPG:2154&wktField=%s" % (";", "WKT")
2) idf_stats_csv = QgsVectorLayer(uri,"idf","delimitedtext")
But this does not work. Do you have any more advice?
file:///
prefix, try something like:uri = "file:///path/to/your/data/idf.csv?delimiter=%s&crs=epsg:2154&wktField=%s" % (";", "WKT")