Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

How to Concatenate Fields

$
0
0
I have an attribute table with approx 1000 records. There are two Fields I care about: Name and Pg_Number (see attached pic)

I would like to consolidate the fields so that I received an output or a new field that combines the Pg_Number field based on the Name Field

Ex.

In my head its something like:
Code:

if [Name] = "Orange Lake" then [Pg_Number] = 5, 6, 7, 8, 9, 10...
if [Name] = "Green Lake" then [Pg_Number] = 11, 12, 13, 14, 15..."
and so on...

I haven't had much experience with Python but I'm trying to build a model/script and I'm getting stuck on how to do this field calc/consolidation.

Any help would be appreciated.Attachment 21511
Attached Thumbnails
Click image for larger version

Name:	table.PNG‎
Views:	N/A
Size:	48.4 KB
ID:	21511  

Viewing all articles
Browse latest Browse all 2485

Trending Articles