<?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: Problem with Summary Statistics in ArcPy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329567#M25639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This seems to work:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy


InPoint = "\\\\hgis01\\gishome\\ladietz\\WCH.gdb\\MR\\MRPoint"
out_dbf = "D:\\temp\\test.dbf"

arcpy.Statistics_analysis(InPoint, out_dbf, "CATEGORY COUNT;OSE_ID NAME", "")




&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;R_&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found what is the problem! Thanks for your help...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to have a problem when I triy to write the dbf table inside a gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested the script and when you write in the different location, everything works fine. If you try to write on a gdb - the same where the input feature class is - you get an error saying the table cannot be created...The probme is solved but I would like to know why this happens and of course I would like to write the table in the same gdb where the in put feature class is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help and....any ideas???&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:36:55 GMT</pubDate>
    <dc:creator>mauriziogibin</dc:creator>
    <dc:date>2021-12-11T15:36:55Z</dc:date>
    <item>
      <title>Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329564#M25636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a question regarding Summary Statistics in ArcPy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with a feature class that contains points whose attributes are two string fields called "CATEGORY" and "NAME".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to count the number of points by category.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the summary statistics is very useful in this case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the syntax would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Statistics_analysis(&amp;lt;points&amp;gt;, &amp;lt;points_dbf&amp;gt;, [["CATEGORY", "COUNT"]], "CATEGORY")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: the &amp;lt;&amp;gt; are used to simplify the input and output table of course! I did not code it like that! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run it as a stand alone script I got a message saying that the ,&amp;lt;points_dbf&amp;gt; cannot be created. It is actually created but it is empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the mistake can be in the way I am passing the fields and statistics required AND I also have a rather sinister feeling...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do the fields HAVE to be numeric?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure and tested in both ModelBuilder and Python Window they do not have to be numeric.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 16:09:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329564#M25636</guid>
      <dc:creator>mauriziogibin</dc:creator>
      <dc:date>2013-06-27T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329565#M25637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This seems to work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy


InPoint = "\\\\hgis01\\gishome\\ladietz\\WCH.gdb\\MR\\MRPoint"
out_dbf = "D:\\temp\\test.dbf"

arcpy.Statistics_analysis(InPoint, out_dbf, "CATEGORY COUNT;OSE_ID NAME", "")




&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329565#M25637</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2021-12-11T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329566#M25638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It requires a numeric field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: Nevermind, it seems the help is outdated. You can count non-numeric fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 18:19:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329566#M25638</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-06-27T18:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329567#M25639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This seems to work:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy


InPoint = "\\\\hgis01\\gishome\\ladietz\\WCH.gdb\\MR\\MRPoint"
out_dbf = "D:\\temp\\test.dbf"

arcpy.Statistics_analysis(InPoint, out_dbf, "CATEGORY COUNT;OSE_ID NAME", "")




&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;R_&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found what is the problem! Thanks for your help...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to have a problem when I triy to write the dbf table inside a gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested the script and when you write in the different location, everything works fine. If you try to write on a gdb - the same where the input feature class is - you get an error saying the table cannot be created...The probme is solved but I would like to know why this happens and of course I would like to write the table in the same gdb where the in put feature class is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help and....any ideas???&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:36:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329567#M25639</guid>
      <dc:creator>mauriziogibin</dc:creator>
      <dc:date>2021-12-11T15:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329568#M25640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I found what is the problem! Thanks for your help...&lt;BR /&gt;It seems to have a problem when I triy to write the dbf table inside a gdb.&lt;BR /&gt;I tested the script and when you write in the different location, everything works fine. If you try to write on a gdb - the same where the input feature class is - you get an error saying the table cannot be created...The probme is solved but I would like to know why this happens and of course I would like to write the table in the same gdb where the in put feature class is.&lt;BR /&gt;Thanks for your help and....any ideas???&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You cannot write a dbf to a gdb... you would have to create a gdb table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 13:21:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329568#M25640</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-02T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329569#M25641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It uses the file extention to determine what type of table/file you are trying to create.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are trying to write the dbf inside a FGDB, then you are most the way there.&amp;nbsp; Just drop the .dbf extension from the filename and it will create a FGDB table instead and will let you save it there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 14:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329569#M25641</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-07-02T14:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Summary Statistics in ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329570#M25642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You cannot write a dbf to a gdb... you would have to create a gdb table.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the problem is solved!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maurizio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 14:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-summary-statistics-in-arcpy/m-p/329570#M25642</guid>
      <dc:creator>mauriziogibin</dc:creator>
      <dc:date>2013-07-02T14:33:06Z</dc:date>
    </item>
  </channel>
</rss>

