<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to extract certain values from a table? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570808#M44753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You might be able to do what you need with SummaryStatistics_analysis, but SearchCursor might be easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, from your description I am not entirely sure how do you imagine your result. Can you paste some code you have in here? Or show us how the table looks exactly?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(when pasting code, use the advanced editor and apply syntax highlighting on the code '&amp;gt;&amp;gt; -&amp;gt; Syntax Highlighting -&amp;gt; python')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am guessing you can get what you are after if you use the sql_clause parameter of the SearchCursor to order your rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Filip.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2014 14:07:28 GMT</pubDate>
    <dc:creator>FilipKrál</dc:creator>
    <dc:date>2014-08-18T14:07:28Z</dc:date>
    <item>
      <title>How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570807#M44752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone! I am trying to write a python script to extract certain values from a table: the table I am referring to is a big collection of nitrate values for different water depths, which are deposited in the columns of the table. As I only need the value of the surface and the deepest point, I want to search through the rows and extract the last value that is not 0. I have started writing a script using the SearchCursor Tool but get stuck at the point, where I want it to search for the first 0-value and then go back and print the value fro mthe column before... Does anyone have an idea how to solve that problem? Thanks a lot in advance! Teresa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 13:53:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570807#M44752</guid>
      <dc:creator>FraukeScharf</dc:creator>
      <dc:date>2014-08-18T13:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570808#M44753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You might be able to do what you need with SummaryStatistics_analysis, but SearchCursor might be easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, from your description I am not entirely sure how do you imagine your result. Can you paste some code you have in here? Or show us how the table looks exactly?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(when pasting code, use the advanced editor and apply syntax highlighting on the code '&amp;gt;&amp;gt; -&amp;gt; Syntax Highlighting -&amp;gt; python')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am guessing you can get what you are after if you use the sql_clause parameter of the SearchCursor to order your rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Filip.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 14:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570808#M44753</guid>
      <dc:creator>FilipKrál</dc:creator>
      <dc:date>2014-08-18T14:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570809#M44754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to look at SQL_Clause of &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000"&gt;ArcGIS Help 10.1&lt;/A&gt;‌.&lt;/P&gt;&lt;P&gt;Set your where clause to depth &amp;gt; 0 and order by depth ASC. First row would be the data that is not zero. (Tweak it depending on your data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14083715326229622" jivemacro_uid="_14083715326229622"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;import arcgisscripting&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;gp = arcgisscripting.create()&lt;/P&gt;
&lt;P&gt;def Message(sMsg):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print sMsg&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage(sMsg)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;# Define the feature class&amp;nbsp; &lt;/P&gt;
&lt;P&gt;fc = str(sys.argv[1])&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;with arcpy.da.SearchCursor(fc, ("ORIG_FID", "OBJECTID"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; "OBJECTID &amp;lt; 10",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; "",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; False,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ("TOP 1", "ORDER BY OBJECTID DESC")) as cursor:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; for row in cursor:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Message(row[1])&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 14:18:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570809#M44754</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-18T14:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570810#M44755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the table! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 08:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570810#M44755</guid>
      <dc:creator>FraukeScharf</dc:creator>
      <dc:date>2014-08-19T08:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570811#M44756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this is the Code so far... As I am new to Python I was only able to start with the basic things, I know this is missing the main part &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14084363692383558" jivemacro_uid="_14084363692383558" modifiedtitle="true"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Set the Workspace&lt;/P&gt;
&lt;P&gt;arcpy.env.workspace = "D:\Teresa\Kerstin\SouthernOcean\03_workspace\Teresa"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Make table&lt;/P&gt;
&lt;P&gt;table = "C:/Users/theidema/Desktop/OxzUti_GridP_Annual.csv"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#Create the search cursor&lt;/P&gt;
&lt;P&gt;cursor = arcpy.SearchCursor(Table)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#Iterate through the rows&lt;/P&gt;
&lt;P&gt;row = cursor.next()&lt;/P&gt;
&lt;P&gt;if row.isNull (field.name):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print (row.getValue(field.name))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cursor.next()&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 08:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570811#M44756</guid>
      <dc:creator>FraukeScharf</dc:creator>
      <dc:date>2014-08-19T08:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570812#M44757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frauke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is what you wanted. As you can see I have saved your csv file as an excel spreadsheet. Below are the assumptions for the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You excel columns are structured as below.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/3600_Untitled.png" style="width: 620px; height: 128px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Once a column ceases to have data, no further columns will have data.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14084505663585393 jive_text_macro" jivemacro_uid="_14084505663585393"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;import arcgisscripting&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;gp = arcgisscripting.create()&lt;/P&gt;
&lt;P&gt;def Message(sMsg):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print sMsg&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage(sMsg)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Define the feature class&amp;nbsp; &lt;/P&gt;
&lt;P&gt;table = "C:\Users\deenr\Desktop\Nitrate.xlsx\Sheet1$"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;fields = arcpy.ListFields(table)&lt;/P&gt;
&lt;P&gt;fieldCnt = len(fields)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;with arcpy.da.SearchCursor(table, ("*")) as cursor:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for row in cursor:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp; cellNonEmpty = ""&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; idx = 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for cell in row:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if idx == 0:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg += "Latitude:" + str(cell)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; elif idx == 1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg += " Longitude:" + str(cell)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; elif fields[idx].name == "0":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg += " Measure at surface is " + str(cell)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; elif cell is None:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg += " Measure at Depth " + fields[idx - 1].name + " is " + str(cellNonEmpty)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; break;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; elif idx == fieldCnt - 1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; msg += " Measure at Depth " + fields[idx].name + " is " + str(cell)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; cellNonEmpty = cell&lt;/P&gt;
&lt;P&gt;&amp;nbsp; idx += 1&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Message(msg)&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 12:16:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570812#M44757</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-19T12:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570813#M44758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, that's a pretty cool dataset.&lt;/P&gt;&lt;P&gt;The text file didn't have a proper header so it requires a bit more manipulation. If the header was just a single row with column names, it would be easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below converts the input text file into a feature class with only the surface nitrate, the deepest non-zero nitrate, and the depth of the deepest non-zero nitrate value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything including the resulting shapefile is in the attached folder. Hopefully the comments in the code will help you understand what it does. A good way to play with it is to run it row by row (block by block) in something like &lt;A href="https://code.google.com/p/pyscripter/"&gt;PyScripter&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14084510614425383 jive_text_macro" jivemacro_uid="_14084510614425383" modifiedtitle="true"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;csv = r'C:\Nitrate_GridP_Annual\Nitrate_GridP_Annual.csv'&lt;/P&gt;
&lt;P&gt;out_fc = r'C:\Nitrate_GridP_Annual\ni.shp'&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# read the csv into memeory&lt;/P&gt;
&lt;P&gt;rows = []&lt;/P&gt;
&lt;P&gt;with open(csv, 'r') as f:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in f:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.append(row.strip())&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# The first two rows are not very useful so let's drop them&lt;/P&gt;
&lt;P&gt;rows.pop(0) # drop the first row&lt;/P&gt;
&lt;P&gt;depths = rows.pop(0) # drop the second row, which is now the first one&lt;/P&gt;
&lt;P&gt;depths = map(int, depths[depths.find(':')+1:].split(','))&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Get lat, lon, Nitrate near the surface, and last non-zero measurement&lt;/P&gt;
&lt;P&gt;newrows = []&lt;/P&gt;
&lt;P&gt;for row in rows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowdata = map(float, row.split(','))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lat, lon = rowdata[0], rowdata[1]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nitrate = rowdata[2:]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_near_surface = nitrate.pop(0) # first is near the surface&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # get the deepest non-zero value and its depth&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_deepest = 0.0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; depth = 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(len(nitrate)):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n = nitrate&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if n &amp;gt; 0:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_deepest = n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d = depths[i+1]&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newrow = [lat, lon, n_near_surface, n_deepest, d]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newrows.append(newrow)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# write output to feature class&lt;/P&gt;
&lt;P&gt;out_path, out_name = os.path.split(out_fc)&lt;/P&gt;
&lt;P&gt;sr = arcpy.SpatialReference(4326) # define coordinate system (WGS84)&lt;/P&gt;
&lt;P&gt;fc = arcpy.management.CreateFeatureclass(out_path, out_name, "POINT", spatial_reference=sr).getOutput(0)&lt;/P&gt;
&lt;P&gt;arcpy.management.AddField(fc, "N_0", "DOUBLE")&lt;/P&gt;
&lt;P&gt;arcpy.management.AddField(fc, "N_DEEP", "DOUBLE")&lt;/P&gt;
&lt;P&gt;arcpy.management.AddField(fc, "DEPTH", "DOUBLE")&lt;/P&gt;
&lt;P&gt;with arcpy.da.InsertCursor(fc, ["SHAPE@", "N_0", "N_DEEP", "DEPTH"]) as ic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in newrows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = arcpy.Point(row[1], row[0]) # remember that lon is x, lat is y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newrow = [pt, row[2], row[3], row[4]]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ic.insertRow(newrow)&lt;/P&gt;
&lt;P&gt;del row&lt;/P&gt;
&lt;P&gt;del ic&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;print fc&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check that the outputs are correct! I rushed a bit while writing this.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Filip.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 12:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570813#M44758</guid>
      <dc:creator>FilipKrál</dc:creator>
      <dc:date>2014-08-19T12:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570814#M44759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Filip!!!!&lt;/P&gt;&lt;P&gt;It is working perfectly, thats awesome!&lt;/P&gt;&lt;P&gt;I cant tell you how happy that makes me!&lt;/P&gt;&lt;P&gt;Have a great day, Teresa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 14:08:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570814#M44759</guid>
      <dc:creator>FraukeScharf</dc:creator>
      <dc:date>2014-08-19T14:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract certain values from a table?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570815#M44760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Riyas, i somehow didnt see your comment before! Thank you so much, its working!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 14:21:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-extract-certain-values-from-a-table/m-p/570815#M44760</guid>
      <dc:creator>FraukeScharf</dc:creator>
      <dc:date>2014-08-19T14:21:23Z</dc:date>
    </item>
  </channel>
</rss>

