From ccc7db8310ba2b3b77a4fd1d8aef74f7f52a7b29 Mon Sep 17 00:00:00 2001 From: Alireza Adli Date: Thu, 15 Aug 2024 19:10:44 -0400 Subject: [PATCH] Return a specific cell of a record --- scrub_layer_class.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scrub_layer_class.py b/scrub_layer_class.py index d5d386f..3e2a9a0 100644 --- a/scrub_layer_class.py +++ b/scrub_layer_class.py @@ -26,6 +26,9 @@ class ScrubLayer: self.layer = self.load_layer() self.data_count = self.layer.featureCount() + def cell_content(self, fid, field_name): + return self.layer.getFeature(fid)[field_name] + def load_layer(self): the_layer = QgsVectorLayer(self.layer_path, self.layer_name, 'ogr') if not the_layer.isValid():