<?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 How to load feature classes from csv list into Contents in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-load-feature-classes-from-csv-list-into/m-p/533307#M17738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a csv file with a list of specific IDs. These IDs relate to the name of feature classes that I want to bring into Contents in my ArcPro project. I am trying to use Python code to do so, but nothing happens when I run the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import pandas, os, arcpy&lt;BR /&gt;gdb = "D:\SphereRoutesStops\S2011_SchoolAstudentsAHW_RS75m_ByStudent_ByDay.gdb"&lt;BR /&gt;walk = arcpy.da.Walk(gdb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df = pandas.read_csv(r'C:\Users\Little\Desktop\Surveys_AgesGenders.csv')&lt;BR /&gt;StudID = df['SID']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for root, dirs, files in walk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for fc in files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if fc.startswith(StudID.values):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.MakeFeatureLayer_management(os.path.join(root,fc))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The csv file is laid out like so:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/476932_Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;The gdb contains feature classes that start with the IDs in question:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/476948_Capture2.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Essentially, I would like to place all feature classes that start with the IDs contained within the csv file into my current map contents. Problem is, when I run the above code in the Python console in ArcPro, nothing happens - no errors, and nothing gets added to Contents.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Dec 2019 19:02:43 GMT</pubDate>
    <dc:creator>MalcolmLittle1</dc:creator>
    <dc:date>2019-12-26T19:02:43Z</dc:date>
    <item>
      <title>How to load feature classes from csv list into Contents</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-load-feature-classes-from-csv-list-into/m-p/533307#M17738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a csv file with a list of specific IDs. These IDs relate to the name of feature classes that I want to bring into Contents in my ArcPro project. I am trying to use Python code to do so, but nothing happens when I run the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import pandas, os, arcpy&lt;BR /&gt;gdb = "D:\SphereRoutesStops\S2011_SchoolAstudentsAHW_RS75m_ByStudent_ByDay.gdb"&lt;BR /&gt;walk = arcpy.da.Walk(gdb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df = pandas.read_csv(r'C:\Users\Little\Desktop\Surveys_AgesGenders.csv')&lt;BR /&gt;StudID = df['SID']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for root, dirs, files in walk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for fc in files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if fc.startswith(StudID.values):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.MakeFeatureLayer_management(os.path.join(root,fc))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The csv file is laid out like so:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/476932_Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;The gdb contains feature classes that start with the IDs in question:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/476948_Capture2.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Essentially, I would like to place all feature classes that start with the IDs contained within the csv file into my current map contents. Problem is, when I run the above code in the Python console in ArcPro, nothing happens - no errors, and nothing gets added to Contents.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 19:02:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-load-feature-classes-from-csv-list-into/m-p/533307#M17738</guid>
      <dc:creator>MalcolmLittle1</dc:creator>
      <dc:date>2019-12-26T19:02:43Z</dc:date>
    </item>
  </channel>
</rss>

