<?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 NumPyArrayToTable Issues? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662126#M51445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hopefully I am missing the obvious here, but there are issues with an output FGDB table (Default.gdb) that is the product of NumPyArrayToTable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone had any issues with this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are no apparent issues or problems with the actual conversion, no errors and the output table appears just fine (I can load it into ArcMap and view the contents, even the field properties are all correct).&amp;nbsp; But for some reason, this output does not succesfully join to another layer (either programatically or manually).&amp;nbsp; The join operation does not fail or error, but no matches are found.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I export this FGDB table to a .dbf, it joins as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code snip:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; ##convert final pandas DataFrame result into a numpyarray dfar = dfarrcombo.to_records() nmpyar = np.array(dfar, np.dtype([('staname', '|S25'), ('STATION', '|S25'), ('site', '|S25'),('change', '&amp;lt;f8'),('pastvalue', '&amp;lt;f8'), ('currentvalue', '&amp;lt;f8')]))&amp;nbsp;&amp;nbsp; ##now covert the numpyarray to the gdb table in the default.gdb&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.da.NumPyArrayToTable(nmpyar, r"H:\Documents\ArcGIS\Default.gdb\numpytab")&amp;nbsp;&amp;nbsp; #....the rest of the code is a join operation &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jun 2013 17:53:22 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2013-06-04T17:53:22Z</dc:date>
    <item>
      <title>NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662126#M51445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hopefully I am missing the obvious here, but there are issues with an output FGDB table (Default.gdb) that is the product of NumPyArrayToTable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone had any issues with this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are no apparent issues or problems with the actual conversion, no errors and the output table appears just fine (I can load it into ArcMap and view the contents, even the field properties are all correct).&amp;nbsp; But for some reason, this output does not succesfully join to another layer (either programatically or manually).&amp;nbsp; The join operation does not fail or error, but no matches are found.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I export this FGDB table to a .dbf, it joins as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code snip:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; ##convert final pandas DataFrame result into a numpyarray dfar = dfarrcombo.to_records() nmpyar = np.array(dfar, np.dtype([('staname', '|S25'), ('STATION', '|S25'), ('site', '|S25'),('change', '&amp;lt;f8'),('pastvalue', '&amp;lt;f8'), ('currentvalue', '&amp;lt;f8')]))&amp;nbsp;&amp;nbsp; ##now covert the numpyarray to the gdb table in the default.gdb&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.da.NumPyArrayToTable(nmpyar, r"H:\Documents\ArcGIS\Default.gdb\numpytab")&amp;nbsp;&amp;nbsp; #....the rest of the code is a join operation &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 17:53:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662126#M51445</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-06-04T17:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662127#M51446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can confirm that it doesn't work by doing a simple join when inside of an FGDB, you'd need to perform arcpy.CopyRows_management() prior to joining. But better than that, have you seen &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000000m000000" rel="nofollow" target="_blank"&gt;arcpy.da.ExtendTable&lt;/A&gt;&lt;SPAN&gt;? That looks to do what you need in one command.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 22:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662127#M51446</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2013-06-04T22:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662128#M51447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I can confirm that it doesn't work by doing a simple join when inside of an FGDB, you'd need to perform arcpy.CopyRows_management() prior to joining. But better than that, have you seen &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000000m000000"&gt;arcpy.da.ExtendTable&lt;/A&gt;? That looks to do what you need in one command.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT/Update: the CopyRows_management is a viable workaround since I am not dealing with a large amount of rows and is a much simpler approach rather than trying to include the ExtendTable method.&amp;nbsp; Still I am frustrated the NumpyArrayToTable doesn't work as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaun,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the input!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ExtendTable is used to join to an existing table, so the first thing I do is build a numpy.array with a single field from a simplified DataFrame (one that contains all of the correct/necessary value for the join operation) and pass this into the arcpy.da.NumPyArrayToTable.&amp;nbsp; So this gives me an existing table to execute the ExtendTable method, using the full numpy array I wish to join with the Feature Class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output table is all correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I run the final join operation to the Feature Class I get the same result (no matches found).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll change some things up and see if I can get this working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;j&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 13:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662128#M51447</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-06-05T13:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662129#M51448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I agree, that is frustrating. I've found an existing open bug related to the issue here: &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg0MjA4"&gt;http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg0MjA4&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:33:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662129#M51448</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2013-06-05T20:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662130#M51449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure what the format of you table is, but is sounds like it is actually a FGDB table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the help docs here: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002n000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002n000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The input must be a feature layer a table view or a raster layer that has an attribute table; it cannot be a feature class or table.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you just need to makeTableView first, then join to that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662130#M51449</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-06-05T22:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: NumPyArrayToTable Issues?</title>
      <link>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662131#M51450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not sure what the format of you table is, but is sounds like it is actually a FGDB table.&lt;BR /&gt;&lt;BR /&gt;According to the help docs here: &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002n000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002n000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Perhaps you just need to makeTableView first, then join to that?&lt;BR /&gt;&lt;BR /&gt;R_&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for the tip.&amp;nbsp; Yes, I am correctly applying the join operation with both arcpy.MakeFeatureLayer_management and arcpy.MakeTableView_management.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 11:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/numpyarraytotable-issues/m-p/662131#M51450</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-06-06T11:23:32Z</dc:date>
    </item>
  </channel>
</rss>

