C++ tricks
Posted: August 1st, 2021, 4:08 pm
Hello. I need to cherry pick a few data in this tiny online csv that contains some bits of US EIA's weekly Petroleum status.
The structure of the file never changes.
As you can see there is now row ID, data/row identifier or anything like that. The 2 first columns ("STUB_1", "STUB_2") relate to measure and geography data dimensions respectively but there several lines with the same combination of "STUB_1" and "STUB_2".
From column 3 to the last row, values correspond to this week, prev week, prev year, this week (4wk ave), this week (4wk ave).
So I know in advance that I will a few data at the intersection of a selected number of rows and columns 3 (this week) & column 4 (prev week).
What is the best way to do this in C++, please? (untold questions include would you read the file row by row ? btw the file is first saved to disk? would you loop over row and columns? are there numpy tools like in C++ nowadays? .. ?)
I'm willing to do this quite consistenly with the way real and modern C++ programmers would do it.
any help much appreciated.
(NO I don't want to use Python, instead)
The structure of the file never changes.
As you can see there is now row ID, data/row identifier or anything like that. The 2 first columns ("STUB_1", "STUB_2") relate to measure and geography data dimensions respectively but there several lines with the same combination of "STUB_1" and "STUB_2".
From column 3 to the last row, values correspond to this week, prev week, prev year, this week (4wk ave), this week (4wk ave).
So I know in advance that I will a few data at the intersection of a selected number of rows and columns 3 (this week) & column 4 (prev week).
What is the best way to do this in C++, please? (untold questions include would you read the file row by row ? btw the file is first saved to disk? would you loop over row and columns? are there numpy tools like in C++ nowadays? .. ?)
I'm willing to do this quite consistenly with the way real and modern C++ programmers would do it.
any help much appreciated.
(NO I don't want to use Python, instead)