<?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: Efficient method to go from a table view or feature layer to a Pandas DataFrame in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762614#M58903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Melanie...suggestions for next time you post, make sure to use something like &lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt;​ so your code is formatted correctly.&amp;nbsp; This is important in many languages, and Python in particular (and I assume in turn Pandas, but I haven't worked with it yet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: and you may want to edit your post and clean up the code....not very useful as is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2016 15:24:33 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2016-03-28T15:24:33Z</dc:date>
    <item>
      <title>Efficient method to go from a table view or feature layer to a Pandas DataFrame</title>
      <link>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762612#M58901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am just starting to use Pandas.&amp;nbsp; I have exported a few geodatabase tables to csv files to load into Pandas DataFrames.&amp;nbsp; I know there has to be a more direct or efficient way to load data from a geodatabase table or feature layer into a Pandas DataFrame.&amp;nbsp; Can any Panda users suggest a better method of getting geodatabase data into Pandas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 02:30:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762612#M58901</guid>
      <dc:creator>MelanieMaguire</dc:creator>
      <dc:date>2012-12-20T02:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient method to go from a table view or feature layer to a Pandas DataFrame</title>
      <link>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762613#M58902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured it out.&amp;nbsp; Here is the code.&amp;nbsp; Now I just need to create a couple utility functions to split my datetime fields before creating the NumPy array from the feature class and then to reassembly my datetime information once I get it into Pandas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy import numpy as np import pandas as pd from pandas import DataFrame&amp;nbsp; #Create variable for feature class fc = r'C:\Projects\MyGeodatabase.gdb\Groundwater\WaterQuality'&amp;nbsp; #Create field list with a subset of the fields (cannot include datetime fields for&amp;nbsp; #da.FeatureClassToNumPy tool) fc_fields = ['OBJECTID', 'WellID', 'Aquifer', 'FlowPeriod', 'As_D_Val','Cu_D_Val', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'GWElev', 'MeasuringPtElev', 'Total_depth', 'E', 'N']&amp;nbsp; #Convert Feature Class to NumPy Array.&amp;nbsp; Due to the fact that NumPy arrays do not #accept null values for integer fields, I had to convert null values to -99999 fc_np = arcpy.da.FeatureClassToNumPyArray(fc, fc_fields, skip_nulls = False,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null_value = -99999)&amp;nbsp; #Convert NumPy array to pandas DataFrame.&amp;nbsp;&amp;nbsp; fc_pd = DataFrame(fc_np)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 12:54:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762613#M58902</guid>
      <dc:creator>MelanieMaguire</dc:creator>
      <dc:date>2012-12-26T12:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient method to go from a table view or feature layer to a Pandas DataFrame</title>
      <link>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762614#M58903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Melanie...suggestions for next time you post, make sure to use something like &lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt;​ so your code is formatted correctly.&amp;nbsp; This is important in many languages, and Python in particular (and I assume in turn Pandas, but I haven't worked with it yet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: and you may want to edit your post and clean up the code....not very useful as is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2016 15:24:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-method-to-go-from-a-table-view-or/m-p/762614#M58903</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-03-28T15:24:33Z</dc:date>
    </item>
  </channel>
</rss>

