Hi all!
I’ve written a (copy-paste based) code to transform data, and it’s quite slow for thousands of companies. However, I lack the intuition for a better approach to the problem. If someone can help me out or point me in the right direction, I would be very thankful
An example is attached.
A description of the problem follows:
I get datasets that consist of company data, where I need to transform the format. Every company comes with:
- 1 row with Name
- X number of rows with fixed information
- Y number of columns with (time) variable data
- 1 column with dates.
The date-column causes the headers to be off by one column. Furthermore, some companies have no data for the selected period, and should be deleted altogether.
The transformed data has one row for every date, and one column for every other datatype (fixed and variable).
Bookmarks