import pandas as pd import numpy as np fc = r'H:\Documents\ArcGIS\Default.gdb\MyFeatureClass' #generate a list of fields flds = [f.name for f in arcpy.ListFields(fc)] #you cannot include Shape/Geometry or Date fields in a NumPyArrray, so remove them from the field list flds.remove('Shape') #this is the geometry field in my FeatureClass flds.remove('START_TEST') #this is a date field in my FeatureClass #convert to a NumPyArray nmpyarr = arcpy.da.TableToNumPyArray(fc, flds) #convert to a Pandas DataFrame dfFC = pd.DataFrame(nmpyarr) #Write the .csv file csv_out = r'H:\Documents\csvOUTPUT.csv' dfFC.to_csv(csv_out)
Hi James, that is definitely an answer. I do thank for the code you posted, I will give it a try as I continue in with Python. Right now I am just happy it is working, once I get more knowledgeable of the code I will go from I can see what it is doing to knowing what it is doing.Thank you again. Dale,
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.