Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
66 views

Duplicating records by using column delimiter in ArcGIS Pro

In ArcGIS Pro 3.3, I have a shapefile where I need to create duplicate records (while preserving geometry per duplicated record) based on the values in a column. The table is structured similar to ...
Cassie's user avatar
  • 13
0 votes
1 answer
45 views

Using search cursor or select for related table data in ArcPy

I am very new to ArcPy and code. I have about 600 zones that overlay ~8000 different census blocks, which have been divided so that census blocks that aren't fully inside a zone are split, meaning ...
carokell's user avatar
1 vote
3 answers
244 views

Updating first occurence of duplicate with lowest value in given field using ArcPy cursor

I have a few hundred GPS data points (saved in an ArcGIS Pro 2.9 file geodatabase) that logged simultaneously with different speeds. I am looking to write a Python script that will compare each row's ...
Olive's user avatar
  • 133
0 votes
1 answer
68 views

i want to create a layer with two different value of a field [closed]

I want to create a layer with two different value of a field. Suppose I have a layer named "Road Network". In that feature class i have a field in attribute table named "addi_rd"......
Auxirus GT's user avatar
2 votes
1 answer
40 views

Replace a field with maximum of it's attribute values based on values repeated on another field's attribute values using ArcPy

So I have performed Spatial Join between a point and line feature class. Now for each point there are several lines. What I want is the maximum count of line features as an attribute value in the &...
soumik chakraborty's user avatar
1 vote
1 answer
88 views

Delete fields from a table based on Mean calculation using ArcPy

I have an attribute table with 100 columns (values are float and not NULL; more than 3000 rows). Using ArcGIS 10.6 I want to calculate the mean value of every field in a shapefile separately (like ...
GisT's user avatar
  • 91
0 votes
1 answer
2k views

Using arcpy.da.SearchCursor to sort field in attribute table by ascending order

I am using ArcMap 10.6 with Python 2.7.14 with ArcPy. I want to sort a field named Seq_ID in my attribute table by ascending order using ArcPy. I believe I have to use arcpy.da.SearchCursor. Here is ...
user avatar
1 vote
1 answer
320 views

Python scripting (update cursor, extract previous row values)

I am new to Python scripting. I would like to use SearchCursor to iterate in each row using the FID as index. Then I would like to evaluate length based on the following conditions: If the length >...
zitJack's user avatar
  • 21
1 vote
2 answers
238 views

Transferring Data From One Table to Another Using Multiple Keys in ArcPy?

I have data in one field and I want to transfer it to a specific field in another table based on specific keys Such as ID, road_type and veg_type. My original table looks like this ID Road_Type ...
harry.p's user avatar
  • 85
1 vote
1 answer
1k views

How do I insert a list of values into individual rows using Python?

I have a dataset that contains a field with a range of numbers (e.g. 1, 2, 3-6) as well as other fields. I've used python to expand the range field into discrete numbers (e.g. 1, 2, 3, 4, 5, 6) stored ...
rrrrrrrr's user avatar
2 votes
2 answers
1k views

Change specific rows in attribute table using Arcpy in ArcGIS 10.3

I need to change values in field "name1" (string field) in specific rows: 70-72 into "no land use" value. I search Arcpy code to do it. i red How to select specific row in attribute table using ...
newGIS's user avatar
  • 4,082
0 votes
1 answer
84 views

write values to raster table

I am working with a .tif raster which has an attribute table. I can successfully add a number of extra fields, however I am having problems populating those fields. When I add the updateCursor part ...
Giacomo's user avatar
  • 307
1 vote
1 answer
200 views

Assigning fishnet attributes by row instead of by column with ArcPy?

I created a fishnet grid and assigned numeric attributes 1-16 to a new field using the arcpy.da.UpdateCursor function. It however assigned the attributes north to south (see image). How can I change ...
ketar's user avatar
  • 476
1 vote
1 answer
577 views

Changing field values selected attributes of shapefile in ArcGIS desktop?

I have nine fields in a shapefile and want to use Python to change the values of those fields. The value would be given by the user. The attributes selected would receive the input value each time ...
pnkjmndhl's user avatar
  • 794
2 votes
1 answer
2k views

Adding values from list to field in feature class using ArcPy?

I have the code below. fc is a shapefile. I add a new field called "RANK". I want to populate the RANK column with values from Final_Rank list. Fortunately, they are of the same size. Field RANK has ...
Thanos Smar's user avatar
2 votes
1 answer
1k views

Updating a table with the changes made from another table

I am trying to do updates to a source table from another table that has a like field (propertyid). I am trying to update all of the fields in the source table. I have gotten the outcome I want with ...
ducksfloat's user avatar
1 vote
1 answer
1k views

Python - Date notation to MM/DD/YYYY

I'm a complete beginner trying to update some fields in an attribute table (i.e. an ArcMap Shapefile) using Python tool. My goal it to update the values from this column to another date notation. ...
Nico13's user avatar
  • 11
0 votes
1 answer
111 views

Arcpy/CSV module extract many columns from GDB table and write to csv

Below is part of a script i wrote a few months back when I was still learning python. Its part of a larger script, its works totally fine but it is really clunky and not 'pythonic'. It is pretty ...
ziggy's user avatar
  • 4,576
3 votes
1 answer
6k views

Creating tables on ArcGIS with arcpy?

I'm using python scripts on ArcGIS 10.2 to read excel files with information and put this results on attribute tables of the ArcGIS. I know how to create a table, add rows, add fields and send ...
S.Rai's user avatar
  • 309
1 vote
1 answer
428 views

Arcpy.da.SearchCursor() help when attribute doesn't exist

I'm updating text elements off of an arcpy.da.SearchCursor script and needed to construct the script to return a response for when the attribute does NOT exist. Here is the snippet of the code THAT ...
Layne LeBleu's user avatar
3 votes
2 answers
314 views

Search for textbits in QGIS

Is there a way to search for only parts of text in QGIS. Imagine I have a field in my attributetable called myField and I have several entries there, something like This is awesome Even more awesome ...
four-eyes's user avatar
  • 3,440
1 vote
1 answer
666 views

How to update new column in attribute table with same values but different field type?

I am struggling a bit with debugging my code, over something that seems very simple. I am using an update cursor to copy and convert existing string data into a new float column of my shapefile's ...
Jebo's user avatar
  • 13
0 votes
0 answers
36 views

Multiple Together Several Fields, then Use Update Cursor

Is it possible to preform multiplication on several fields of an attribute table together and then use an update cursor to assign the resulting value to a specific field?
user3185924's user avatar
3 votes
2 answers
137 views

Removing values from shapefile with ArcPy?

I have a large shapefile with lots of duplicate records. However, each duplicate record has an accuracy rating. I want to remove all duplicate records with a lower accuracy rating. This would be ...
RFree27's user avatar
  • 33
1 vote
1 answer
872 views

Stuck updating one field based on the condition of another using Acrpy or Field Calculator

I have a shapefile with 5,000 city points. I need to populate a new field, "cls_pop", based on each cities population, so that cities with a population > 2,000,000 will have "cls_pop" = 1, cites with ...
SpookyDLX's user avatar
  • 111
12 votes
1 answer
2k views

Fastest methods for modifying attribute tables with Python?

A while ago, I wrote a quick Python function for converting an attribute table to a python dictionary, where the key is taken from a user-specified unique ID field (typically the OID field). ...
nmpeterson's user avatar
  • 8,393
2 votes
1 answer
792 views

Updating and inserting a field within the same loop

I am working with an empty feature class where I am writing a script to create polylines within the featureclass and attach an associated text value with the polyline. I am using a for loop as noted ...
Ryan Spencer's user avatar