I want to select polygons in a (double field type) and export them, and I keep getting this error:

ExecuteError: ERROR 000358: Invalid expression "dobule" = '1' Failed to execute (Select).

This is my code

outws = r'F:\Documentos\ArcGIS\Default.gdb'
shp = r'F:\Documentos\ArcGIS\ensayo'
campos = 'dobule'
y= "_"+str(int(row[0]))
         out_fc = os.path.join(outws, y)
         where_clause =  """"{}" = '{}'""".format(campos,arcpy.AddFieldDelimiters(shp, row[0]))
         arcpy.Select_analysis(shp, out_fc, where_clause)

closed as off-topic by Vince, PolyGeo Feb 11 at 6:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Vince, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    The error message is quite specific. Have you not tried removing the quotes around the double value? Note that equivalence comparisons for floating-point types are notoriously risky, since so many values are not representable. – Vince Feb 11 at 2:53
  • Thank you Vince!, I didn't realize that. Removing the quotes works pretty fine – Luis Medina Feb 11 at 3:02
  • 1
    This looks like a use case for the Split By Attribute tool. – PolyGeo Feb 11 at 3:27
  • I'm currently using ArcMap 10.4, and that tool is only available for ArcMap 10.6 – Luis Medina Feb 11 at 3:48
  • Looks like it came in at 10.5: desktop.arcgis.com/en/arcmap/10.5/tools/analysis-toolbox/… – PolyGeo Feb 11 at 4:09