<?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 Choosing a feature and selecting by attributes using arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/choosing-a-feature-and-selecting-by-attributes/m-p/759982#M58626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey All- Let's says I have a list of state Names in a Python script:&lt;/P&gt;&lt;P&gt;stateNames =&amp;nbsp;['Alabama', 'California', 'Colorado', ...]&lt;/P&gt;&lt;P&gt;I also have a gdb called states.gdb, that has a feature for each state: Alaska, Alabama, California, etc...&lt;/P&gt;&lt;P&gt;I also have an attribute value that I want to use to select certain features by attribute. Lets say its 'Fips_code' = 01007.&lt;/P&gt;&lt;P&gt;Using an item from my stateNames list, lets use stateNames[0] or Alabama, I want to get the Alabama feature from my states.gdb and select all of the records that have have Fips_code = 01007. Any suggestions on where to begin?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2018 20:54:47 GMT</pubDate>
    <dc:creator>JustinBridwell2</dc:creator>
    <dc:date>2018-08-01T20:54:47Z</dc:date>
    <item>
      <title>Choosing a feature and selecting by attributes using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/choosing-a-feature-and-selecting-by-attributes/m-p/759982#M58626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey All- Let's says I have a list of state Names in a Python script:&lt;/P&gt;&lt;P&gt;stateNames =&amp;nbsp;['Alabama', 'California', 'Colorado', ...]&lt;/P&gt;&lt;P&gt;I also have a gdb called states.gdb, that has a feature for each state: Alaska, Alabama, California, etc...&lt;/P&gt;&lt;P&gt;I also have an attribute value that I want to use to select certain features by attribute. Lets say its 'Fips_code' = 01007.&lt;/P&gt;&lt;P&gt;Using an item from my stateNames list, lets use stateNames[0] or Alabama, I want to get the Alabama feature from my states.gdb and select all of the records that have have Fips_code = 01007. Any suggestions on where to begin?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 20:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/choosing-a-feature-and-selecting-by-attributes/m-p/759982#M58626</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-08-01T20:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Choosing a feature and selecting by attributes using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/choosing-a-feature-and-selecting-by-attributes/m-p/759983#M58627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-attribute.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-attribute.htm"&gt;Select Layer By Attribute—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can do it manually and save the expression, then use it by modifying the code snippet in the help.&lt;/P&gt;&lt;P&gt;In your case, query the states field for Alabama 'And' the FIP's field equal to your value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 21:14:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/choosing-a-feature-and-selecting-by-attributes/m-p/759983#M58627</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-01T21:14:59Z</dc:date>
    </item>
  </channel>
</rss>

