Tag Info

New answers tagged

0

This seems to be explained by the documentation for Feature To Point: Note: The Preserve attributes parameter (the attributes parameter in scripting) does not work and should not be used. It will not be removed for backward compatibility of scripts or models. The output attribute schema and field values for certain input combinations may be ...


1

A complete one-liner would be [f.name for f in arcpy.ListFields(featureclass) if f.type not in ["String"]] You can add more entries to the latter list that you do not want to include, or the ones that you want to include by removing not operator.


6

The simplest way is to create a full list and then remove the ones you don't want: AllFields = [f.name for f in arcpy.ListFields(featureclass)] StringFields = [f.name for f in arcpy.ListFields(featureclass,field_type='String')] NoStringFields = [x for x in AllFields if x not in StringFields ] Which could be compressed onto a single line: ...



Top 50 recent answers are included