<?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 from_featureclass() method parameters in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396969#M9771</link>
    <description>&lt;P&gt;Thanks for the quick response. I tried the same code within ArcGIS Pro and it worked, but when I ran it from NB Server it didn't give me the subset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChenChen4_1-1710615106783.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98260i48FE3DEF872B6430/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChenChen4_1-1710615106783.png" alt="ChenChen4_1-1710615106783.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll do more testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Mar 2024 18:52:00 GMT</pubDate>
    <dc:creator>ChenChen4</dc:creator>
    <dc:date>2024-03-16T18:52:00Z</dc:date>
    <item>
      <title>Problem with from_featureclass() method parameters</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396956#M9769</link>
      <description>&lt;P&gt;I am following a tutorial at&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/part2-data-io-reading-data/" target="_blank"&gt;https://developers.arcgis.com/python/guide/part2-data-io-reading-data/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I use optional parameters from the from_featureclass() method to refine return results, I don't get a subset of the dataset. The full dataset has 3886 rows x 50 columns. It does not matter if I specify the fields parameter or SQL query or where clause, it always return the full dataset:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChenChen4_0-1710610580232.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98256i0F24B019B3BAF0C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChenChen4_0-1710610580232.png" alt="ChenChen4_0-1710610580232.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any recommendations?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 17:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396956#M9769</guid>
      <dc:creator>ChenChen4</dc:creator>
      <dc:date>2024-03-16T17:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with from_featureclass() method parameters</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396961#M9770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/167969"&gt;@ChenChen4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What version of the arcgis API are you using? I tested in version 2.2.0.1 and all seems to work as its should. See below in IDE and in Notebook. Maybe try a new notebook and the code below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GIS
import pandas as pd

fc = r"C:\Users\glenb\Documents\Python\sedf_data\cities\cities.shp"

fcls_flds = pd.DataFrame.spatial.from_featureclass(location=fc, fields=["st"])

print(fcls_flds.shape)
&amp;gt;&amp;gt;&amp;gt; (3886, 2)

fcls_whr = pd.DataFrame.spatial.from_featureclass(location=fc, where_clause="st='ID' and pop_class=6")

print(fcls_whr.shape)
&amp;gt;&amp;gt;&amp;gt;(15, 51)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clubdebambos_0-1710612360153.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98257i51F3F1D2B4617843/image-size/large?v=v2&amp;amp;px=999" role="button" title="Clubdebambos_0-1710612360153.png" alt="Clubdebambos_0-1710612360153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 18:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396961#M9770</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2024-03-16T18:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with from_featureclass() method parameters</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396969#M9771</link>
      <description>&lt;P&gt;Thanks for the quick response. I tried the same code within ArcGIS Pro and it worked, but when I ran it from NB Server it didn't give me the subset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChenChen4_1-1710615106783.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98260i48FE3DEF872B6430/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChenChen4_1-1710615106783.png" alt="ChenChen4_1-1710615106783.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll do more testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 18:52:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/problem-with-from-featureclass-method-parameters/m-p/1396969#M9771</guid>
      <dc:creator>ChenChen4</dc:creator>
      <dc:date>2024-03-16T18:52:00Z</dc:date>
    </item>
  </channel>
</rss>

