I'm just trying to extract the variable value of the 7th column of the first row in a vector layer. I'm not sure how to index the table exactly though. I included the lines I wrote, which I imagine are pretty close. I think the third line is what needs tweaking?
lyr = iface.activeLayer() features = lyr.getFeatures() attrs = features.attributes() var = attrs
I found solutions where they go through a loop of all the features but I'm trying to avoid this if possible.