I have seen Specifying Resource Field For Labeling in ArcPy with ArcMap but it refers to ArcMap and arcpy.mapping whereas I am using arcpy.mp with ArcGIS Pro.
I have a polygon feature class called "Python_fc" in a layer of the same name on my map called "Map" and this feature class (and layer) has a few fields, among them "Id" and "Ratio"
I want to write a code that makes labels on each polygon using the field "Ratio" but when I use the code below it labels by the "Id" field:
for m in aprx.listMaps("Map"): for lyr in m.listLayers("python_FC"): lyr.showLabels = True
How do I get labels to come from the "Ratio" field instead?