<?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: Random Selection of Attributes in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425767#M33444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a field to your table&lt;/P&gt;&lt;P&gt;Do a field calculation &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/calculate-field-examples.htm#ESRI_SECTION1_E240EA484E2A459582E56871DD0BB862" rel="nofollow noopener noreferrer" target="_blank"&gt;as described here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or you can substitute random.randint in place of random.random if you want integers.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; random&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;randint&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

a
&lt;SPAN class="number token"&gt;96&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or even draw from a uniform distribution&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;u &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;random&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;uniform&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
u
&lt;SPAN class="number token"&gt;54&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or other types of distributions depending on your needs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 19:10:56 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-11T19:10:56Z</dc:date>
    <item>
      <title>Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425764#M33441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to know how to randomly select certain values from the attribute table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425764#M33441</guid>
      <dc:creator>KarunaPaudel</dc:creator>
      <dc:date>2017-07-18T13:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425765#M33442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the &lt;A class="link-titled" href="https://docs.python.org/2/library/random.html" title="https://docs.python.org/2/library/random.html"&gt;random&lt;/A&gt;&amp;nbsp;module. &amp;nbsp;Do you need random values in an attribute table? &amp;nbsp;Or random rows?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:22:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425765#M33442</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-07-18T13:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425766#M33443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to use it from python and not from ArcMap. Also, I just need to select the attributes and not assign random numbers to it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:25:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425766#M33443</guid>
      <dc:creator>KarunaPaudel</dc:creator>
      <dc:date>2017-07-18T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425767#M33444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a field to your table&lt;/P&gt;&lt;P&gt;Do a field calculation &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/calculate-field-examples.htm#ESRI_SECTION1_E240EA484E2A459582E56871DD0BB862" rel="nofollow noopener noreferrer" target="_blank"&gt;as described here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or you can substitute random.randint in place of random.random if you want integers.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; random&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;randint&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

a
&lt;SPAN class="number token"&gt;96&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or even draw from a uniform distribution&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;u &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;random&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;uniform&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
u
&lt;SPAN class="number token"&gt;54&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or other types of distributions depending on your needs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:10:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425767#M33444</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T19:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425768#M33445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The random module is a Python module.... Do you need to select random attributes from a single field? &amp;nbsp;All fields? Some fields? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please expand on your question. &amp;nbsp;Give an example.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:32:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425768#M33445</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-07-18T13:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425769#M33446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh, then generate your random integers, and use those in a search cursor to extract the values you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425769#M33446</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-07-18T13:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425770#M33447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A good discussion along with several good code examples can be found in previous threads, including &lt;A href="https://community.esri.com/thread/121745"&gt;https://community.esri.com/thread/121745&lt;/A&gt; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:25:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425770#M33447</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-18T14:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Random Selection of Attributes</title>
      <link>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425771#M33448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much. This seems to work for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 15:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/random-selection-of-attributes/m-p/425771#M33448</guid>
      <dc:creator>KarunaPaudel</dc:creator>
      <dc:date>2017-07-18T15:12:24Z</dc:date>
    </item>
  </channel>
</rss>

