I need to control the number of significant digits assigned to attributes of an ESRI shapefile that I need to write.
UPDATE: I was using "round()" but it did not seem to work when I checked the result in QGIS Attribute table. The "problem" may in fact be in QGIS for the representation of decimals. Compare the "Form" view and the "Table" view below: digits are rounded in one but not the other.