<?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 Error exporting Spatially Enabled DataFrame to shapefile in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-exporting-spatially-enabled-dataframe-to/m-p/802846#M2138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm&amp;nbsp;running a jupyter notebook&amp;nbsp;and using&amp;nbsp;spatially enabled data frames for the first time. When I export the data to a shapefile following the example &lt;A href="https://developers.arcgis.com/python/guide/introduction-to-the-spatially-enabled-dataframe/"&gt;here&lt;/A&gt;, I&amp;nbsp;am getting the error below. The export does producing the shapefile I'm looking for. But I'd like to know how to avoid the error message, so that I can share a clean jupyter notebook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insights would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Read csv as pandas dataframe (Monday)&lt;/STRONG&gt;&lt;BR /&gt;Monday&amp;nbsp;= pd.read_csv("Fall2018.csv", dtype={'BLDGCODE': 'str'})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Import shapefile as Spatially Enabled Dataframe (Buildings)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Buildings&amp;nbsp;= pd.DataFrame.spatial.from_featureclass("Shapefile/Building_Cartographic_Shape.shp")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#merge&amp;nbsp;Monday&amp;nbsp;data with Buildings polygons&lt;/STRONG&gt;&lt;BR /&gt;MondayPolys = pd.merge(Monday, Buildings, how='left', on=['BLDGCODE'] , validate="one_to_many")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Export to shapefile&lt;/STRONG&gt;&lt;BR /&gt;MondayPolys.spatial.to_featureclass(location=r"Data/MondayPolys.shp")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ValueError&lt;/SPAN&gt;                                Traceback (most recent call last)&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\pandas\core\generic.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;__nonzero__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   1574&lt;/SPAN&gt;         raise ValueError("The truth value of a {0} is ambiguous. "&lt;SPAN class="" style="color: #00a250;"&gt;   1575&lt;/SPAN&gt;                          &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"Use a.empty, a.bool(), a.item(), a.any() or a.all()."&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;-&amp;gt; 1576&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;                          .format(self.__class__.__name__))&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   1577&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;   1578&lt;/SPAN&gt;     __bool__ &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; __nonzero__ &lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ValueError&lt;/SPAN&gt;: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jun 2019 14:22:57 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-06-07T14:22:57Z</dc:date>
    <item>
      <title>Error exporting Spatially Enabled DataFrame to shapefile</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-exporting-spatially-enabled-dataframe-to/m-p/802846#M2138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm&amp;nbsp;running a jupyter notebook&amp;nbsp;and using&amp;nbsp;spatially enabled data frames for the first time. When I export the data to a shapefile following the example &lt;A href="https://developers.arcgis.com/python/guide/introduction-to-the-spatially-enabled-dataframe/"&gt;here&lt;/A&gt;, I&amp;nbsp;am getting the error below. The export does producing the shapefile I'm looking for. But I'd like to know how to avoid the error message, so that I can share a clean jupyter notebook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insights would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Read csv as pandas dataframe (Monday)&lt;/STRONG&gt;&lt;BR /&gt;Monday&amp;nbsp;= pd.read_csv("Fall2018.csv", dtype={'BLDGCODE': 'str'})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Import shapefile as Spatially Enabled Dataframe (Buildings)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Buildings&amp;nbsp;= pd.DataFrame.spatial.from_featureclass("Shapefile/Building_Cartographic_Shape.shp")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#merge&amp;nbsp;Monday&amp;nbsp;data with Buildings polygons&lt;/STRONG&gt;&lt;BR /&gt;MondayPolys = pd.merge(Monday, Buildings, how='left', on=['BLDGCODE'] , validate="one_to_many")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#Export to shapefile&lt;/STRONG&gt;&lt;BR /&gt;MondayPolys.spatial.to_featureclass(location=r"Data/MondayPolys.shp")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ValueError&lt;/SPAN&gt;                                Traceback (most recent call last)&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\pandas\core\generic.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;__nonzero__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(self)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   1574&lt;/SPAN&gt;         raise ValueError("The truth value of a {0} is ambiguous. "&lt;SPAN class="" style="color: #00a250;"&gt;   1575&lt;/SPAN&gt;                          &lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"Use a.empty, a.bool(), a.item(), a.any() or a.all()."&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;-&amp;gt; 1576&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;                          .format(self.__class__.__name__))&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   1577&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;   1578&lt;/SPAN&gt;     __bool__ &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; __nonzero__ &lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ValueError&lt;/SPAN&gt;: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2019 14:22:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-exporting-spatially-enabled-dataframe-to/m-p/802846#M2138</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-06-07T14:22:57Z</dc:date>
    </item>
  </channel>
</rss>

