Question

Split csv data(columns) into day/hour "packages"

  • 28 December 2022
  • 2 replies
  • 4 views

Hello,

I have a set of .csv files that contains values for each hour of the year, ie 8760 values. How can I split this into 365 days (24 value packages)? The filename is the identifier of the "curve".

 

FME seems to have issues with so much columns because it crashes when I try to see the data in AttributeManager. Example file is attached.

 

Workaround is of course to transpose these in Excel and use Excel files instead but it requires manual work since there are quite many files


2 replies

Badge +6

Hello @_jami_​ , I took a quick look at your data in data inspector. The reason data inspector is seeing getting so many columns is because it is reading every attribute as a column. I would suggest reviewing the contents of the data to make sure where the heading starts/end so that you can correctly place the attributes under the correct columns. You can play around with these settings by clicking parameters in the reader dialogue

Badge +4

Hi @_jami_​ ,

 

I've attached a different approach, using the text reader to read the entire file at once, building a list and then making groups per 24 features. I've attached a workspace template. Hope this helps!

 

 

Reply