Skip to main content
Question

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

  • December 28, 2022
  • 2 replies
  • 21 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

JennaKAtSafe
Safer
Forum|alt.badge.img+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


pimc
Contributor
Forum|alt.badge.img+8
  • Contributor
  • January 2, 2023

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!

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings