<?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 calculate the total number of rows of several feature classes? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183717#M14124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just need to know the total no. of records, add all the features to TOC; Turn all layers on. Zoom to Full extent. Select all the features using&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/126344_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/126274_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;At the bottom, you could see the total no. of features selected among all features (Make sure that all the layers are selectable)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 20:38:12 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2015-09-10T20:38:12Z</dc:date>
    <item>
      <title>How to calculate the total number of rows of several feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183714#M14121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am performing a merge of several feature classes and I want to make sure I am missing any rows. In order to that I get the count of rows in each feature class and the row count of the output feature class and compare them. &lt;/P&gt;&lt;P&gt;The Get Count_management tool accepts one feature class at the time. How can I select several feature classes and count the rows as a total?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried creating variables that = arcpy.get count_management(featureclass) and then add them but I get an error message. It says these counts are results and not integers.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:25:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183714#M14121</guid>
      <dc:creator>MaryamSanieian</dc:creator>
      <dc:date>2015-09-10T20:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total number of rows of several feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183715#M14122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are close.&amp;nbsp; The &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/get-count.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Get Count &lt;/A&gt;tool, like most geoprocessing tools, returns &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/result.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Result &lt;/A&gt;objects.&amp;nbsp; Assuming you don't get any errors, the following should work:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;res = arcpy.GetCount_management(dataset)
int(res.getOutput(0))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:20:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183715#M14122</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T09:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total number of rows of several feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183716#M14123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Consult the &lt;A href="http://resources.arcgis.com/EN/HELP/MAIN/10.1/index.html#/Get_Count/0017000000n7000000/"&gt;help page&lt;/A&gt; for the tool. At the bottom of each tool reference page, there is a code example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Get Count, the example shows how to return the integer value:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14419173236309697 jive_text_macro" data-renderedposition="71_8_912_16" jivemacro_uid="_14419173236309697"&gt;&lt;CODE style="font-size: 11.44px;"&gt;&lt;SPAN class="n" style="font-size: 11.44px;"&gt;result&lt;/SPAN&gt; &lt;SPAN class="o" style="font-size: 11.44px;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nb" style="font-size: 11.44px;"&gt;int&lt;/SPAN&gt;&lt;SPAN class="p" style="font-size: 11.44px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n" style="font-size: 11.44px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="font-size: 11.44px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="font-size: 11.44px;"&gt;GetCount_management&lt;/SPAN&gt;&lt;SPAN class="p" style="font-size: 11.44px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n" style="font-size: 11.44px;"&gt;lyrfile&lt;/SPAN&gt;&lt;SPAN class="p" style="font-size: 11.44px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="o" style="font-size: 11.44px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="font-size: 11.44px;"&gt;getOutput&lt;/SPAN&gt;&lt;SPAN class="p" style="font-size: 11.44px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi" style="font-size: 11.44px; color: #666666;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="p" style="font-size: 11.44px;"&gt;))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:35:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183716#M14123</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-09-10T20:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total number of rows of several feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183717#M14124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just need to know the total no. of records, add all the features to TOC; Turn all layers on. Zoom to Full extent. Select all the features using&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/126344_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/126274_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;At the bottom, you could see the total no. of features selected among all features (Make sure that all the layers are selectable)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183717#M14124</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-09-10T20:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total number of rows of several feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183718#M14125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can run this within a for loop as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GetCount_management(fc)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where fcList is a list of feature class. You can also use arcpy.ListFeatureClasses() to get a list from workspace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mahtab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:20:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-calculate-the-total-number-of-rows-of/m-p/183718#M14125</guid>
      <dc:creator>MahtabAlam1</dc:creator>
      <dc:date>2021-12-11T09:20:47Z</dc:date>
    </item>
  </channel>
</rss>

