Skip to main content
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

  • Online Training
    rosemartinhas earned the badge Online Training
  • FME Certified Professional
    cforsdickhas earned the badge FME Certified Professional
  • Online Training
    learningfmehas earned the badge Online Training
  • FME Form Advanced Training
    jpanfmehas earned the badge FME Form Advanced Training
  • FME Form Advanced Training
    fionasinhas earned the badge FME Form Advanced Training
Show all badges

Community Stats

32,416
Posts
122,934
Replies
40,136
Members

Latest FME