Skip to main content
  • 10000+ Posts
  • 53,235 Replies
10000+ Posts
Can the FME PythonCreator generate a csv in memory and output it embedded in an attribute on the feature?

I'm trying to migrate some python into FME that involves DataFrames as the end result.  Rather than trying to manually handle converting the DataFrame to attributes, I thought I could convert the dataframe to a csv in python memory first,  output it as a file on the feature, and then use a CSV reader in the workspace to parse the file.  I ran into issues with getting the csv out to an attribute, so if anyone knows of a way to do this I'd appreciate it. Below is a simplified version of my code (it involves Esri's ArcGIS API for Python), and then I'm using io.StringIO to handle the csv in memory, but I've never used that function before. When I run the workspace with this as a Python Creator, i get the error: Python Exception <TypeError>: Could not convert attribute value to a supported attribute type.Traceback (most recent call last): File "<string>", line 33, in input import fmeimport fmeobjects

Badge Winners

Show all badges

Community Stats

32,413
Posts
122,925
Replies
40,132
Members

Latest FME