I've retrieved some attributes and coordinates from a point layer in QGIS:
path_file = myfile layer = QgsVectorLayer(path_file, "name", "ogr") QgsProject.instance().addMapLayer(layer) features = layer.getFeatures() for f in features: point = f.geometry().asPoint() x = point.x() y = point.y()
and I'd like to export
"y" values into a CSV file, possibly one for a column. I tried with
.write() but couldn't get a good output. Any help?