ArcPython work with table

1152
5
08-22-2016 05:26 AM
AlesgerMammedov2
New Contributor

Good day. I have table with drill hole. Drill hole name is repeating for each drillng interval.

For example drill hole interval

a1 1
a1 2
a1 3
b1 4
b1 5
b1 6

Now i want to select drill hole (rows) with minimal interval

for example a1 1
b1 4

How can you help me ?

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

Given the ArcGIS Python API is still in beta and focused on Web GIS, I assume you are talking about ArcPy.  Before offering any suggestions, it would help to know why exactly you want to select these records?  Do you plan on doing some processing of these records?  In the GUI or through scripting? 

FC_Basson
MVP Regular Contributor

You could split the value into 2 new fields and then do a Summarize on the "a1" column and select First record (if the records are permanently sorted on the second part).  So first create 2 new fields - a text field and an integer field.  Then run the split in the field calculator:

Field 1 - !Value!.split(" ")[0]

Field 2 - int( !Value!.split(" ")[1] )

Then do a permanent sort on the second split field.

Then do the summarize on the first split field

With the output table looking like this

AlesgerMammedov2
New Contributor

Thank you very much, but i want to get shp file

0 Kudos
FC_Basson
MVP Regular Contributor

Then just do a join on your original layer with the merged values from the output table.

0 Kudos
NeilAyres
MVP Alum

If this is something to do with logging or sampling down a drillhole, the interval table is normally joined to the drillhole polyline zm using linear events.

First you need the drill trace polyline which has measures on the 3d length.

Then you can map the data table to it using the data in the table like "m_From, m_To", back to the measures.

If this is your scenario, please post some of the data here.

0 Kudos