<div dir="ltr">Hi Admire<div><br></div><div>I modified the following code from the link suggested by Jacob and it worked out perfect in ArcGIS.<br><div><br></div><div><a href="http://gis.stackexchange.com/questions/169770/need-to-find-max-value-among-fields-and-print-field-name" target="_blank" style="font-size:12.8px">http://gis.stackexchange.com/questions/169770/need-to-find-max-value-among-fields-and-print-field-name</a><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Martin</div><div dir="ltr"><br></div></div></div></div>
<br><div class="gmail_quote">On Mon, Aug 1, 2016 at 8:07 AM, Admire Nyakudya <span dir="ltr"><<a href="mailto:addloe@gmail.com" target="_blank">addloe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Martin</p><span class="">
<p dir="ltr">On 31 Jul 2016 23:10, <<a href="mailto:martinmchari@gmail.com" target="_blank">martinmchari@gmail.com</a>> wrote:<br>
><br>
> Hi <br>
><br>
> Am looking for a Python script for adding a new scores field to an attribute table and assigning scores to rows in fields in an attribute table. </p>
</span><p dir="ltr">What have you tried?. If you need help on the list we expect you to have done some ground work and highlight areas where people could improve your code so that it could be efficient.</p><span class="">
<p dir="ltr">> For example in a table with fields A, B, C, D. If maximum number in a row is in field B then assign score of 2. If it is in  field A score is 1, if field C score assign score of 3 in scores field.‎</p>
</span><p dir="ltr">I suggest you look at some pyqgis documentation.<br>
<a href="http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html" target="_blank">http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html</a></p>
<p dir="ltr">Also look at <a href="http://gis.stackexchange.com" target="_blank">http://gis.stackexchange.com</a> for similar questions and adapt the answer accordingly.</p>
<p dir="ltr">Regards<br>
><br>
> Kind regards<br>
><br>
> Martin ‎<br>
> _______________________________________________<br>
> Africa mailing list<br>
> <a href="mailto:Africa@lists.osgeo.org" target="_blank">Africa@lists.osgeo.org</a><br>
> You can UNSUBSCRIBE at <a href="http://lists.osgeo.org/mailman/listinfo/africa" target="_blank">http://lists.osgeo.org/mailman/listinfo/africa</a><br></p>
<br>_______________________________________________<br>
Africa mailing list<br>
<a href="mailto:Africa@lists.osgeo.org">Africa@lists.osgeo.org</a><br>
You can UNSUBSCRIBE at <a href="http://lists.osgeo.org/mailman/listinfo/africa" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/africa</a><br></blockquote></div><br></div></div>