<?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 can I insert a record N amount of times using cursors? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7397#M609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't you do it using a for loop and range?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; sample_data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; sample &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; sample_data&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sample&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"insert"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"done"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
insert
insert
done
insert
insert
insert
insert
insert
done
insert
insert
insert
done&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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:18:28 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-10T20:18:28Z</dc:date>
    <item>
      <title>How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7396#M608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to generate a polygon FC using some records previously flagged as 'NUMBER_GT_NUMBER_END = 1'&lt;/P&gt;&lt;P&gt;These records need to be loaded into a new schema of the same FC in order to include duplicates that will be used later for other processes. If you run the code as I am giving it here, it will print out the number of records per OBJECTID. The issue is that I am able to insert only one for each case. Once added a record into the new FC schema, I want to update the SITUS_STREET_NUMBER field with the value stored in x + 1. I have been going back and forth with other approaches like using Append, Copy, among others, but the process is really slow in comparison to the one achieved so far using the da.cursors.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;OBJECTID = 28964 ---&amp;gt; 3 records&lt;/P&gt;&lt;P&gt;4815&lt;/P&gt;&lt;P&gt;4816&lt;/P&gt;&lt;P&gt;4817&lt;/P&gt;&lt;P&gt;This means that the above polygon geometry with OBJECTID = 28964 needs to be inserted to the new FC three times and that the SITUS_STREET_NUMBER field needs to be updated with the listed values.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/8586"&gt;Jake Skinner&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 20:05:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7396#M608</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2017-01-25T20:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7397#M609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't you do it using a for loop and range?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; sample_data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; sample &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; sample_data&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sample&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"insert"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"done"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
insert
insert
done
insert
insert
insert
insert
insert
done
insert
insert
insert
done&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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7397#M609</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-10T20:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7398#M610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;Darren thanks for your feedback but I am still stuck in the same step (I guess).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;Not sure if you ran my script but it does a similar thing. It iterates using the xrange. In addition, it also provides me with the numbers that will be used later to update some values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;Example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;OBJECTID = 28964 ---&amp;gt; 3 records&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;4815&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;4816&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;4817&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;OBJECTID = 39423 ---&amp;gt; 999 records&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1976&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1977&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1978&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1979&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1980&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;1981&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: #333333;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I am missing now is the piece of the code that will allow me to insert the rows N number of times according to this xrange.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:48:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7398#M610</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2017-01-25T21:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7399#M611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;on iPad.. no download, are you trying to use an insertcursor&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/insertcursor-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/insertcursor-class.htm"&gt;InsertCursor—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:55:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7399#M611</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-01-25T21:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7400#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first glance, a couple of thoughts.&amp;nbsp; You are using both the original/older cursors as well as the newer Data Access cursors.&amp;nbsp; Although doing so is technical feasible, and possibly even supported, it creates readability and maintainability issues because the syntax for the two types of cursors are different.&amp;nbsp; I recommend just using one type of cursor, specifically the newer Data Access cursors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, you appear to be re-creating the insert cursor every time you want to insert a record, even a duplicate of a previous record.&amp;nbsp; Without running your code, I may be mistaken.&amp;nbsp; If I am not, you might want to refactor the code so the insert cursor isn't being recreated if it doesn't need to be.&amp;nbsp; Creating cursors is an expensive operation, so reusing/resetting a cursor is desirable if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7400#M612</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-01-25T22:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7401#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes sir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:14:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7401#M613</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2017-01-25T22:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7402#M614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then follow Joshua's advice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7402#M614</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-01-25T22:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7403#M615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua thanks a lot for your feedback. Can you provide an example of what you are suggesting? Not sure if you notice from my script that I am not a programmerJ. I am getting a little bit confused/lost with your programming lingo. Again, thanks a lot for your feedback&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7403#M615</guid>
      <dc:creator>ErnestoCarreras3</dc:creator>
      <dc:date>2017-01-25T22:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert a record N amount of times using cursors?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7404#M616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you should generally follow this pattern, but you've got quite a few changes ahead of you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;iCur =&amp;nbsp;arcpy.da.InsertCursor(featureClassCopy, fieldnames) # make before any loops
with arcpy.da.SearchCursor(featureClass, fieldnames, ...) as sCur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for sRow in sCur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for x in range(sRow[99]) # replace 99 with whatever field index your value should be
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCur.insertRow(sRow) # insert&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-insert-a-record-n-amount-of-times-using/m-p/7404#M616</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-10T20:18:31Z</dc:date>
    </item>
  </channel>
</rss>

