I have a large number (50+) of CSV files of user inputs. I would like to pull out the inputs from a subsets of the users. The data files look like this:
A@gmail.com, data1, data2, ... , data15
B@gmail.com, data1, data2, ... , data15
...
In particular, every file has the same number of entries. The csv file of subset of users to be pulled out looks like this:
K@gmail.com
L@gmail.com
W@gmail.com
and I want to extract the entries for (say) data2, data3 and data7. What is the best and simplest way to do this?
Note:
- This question is similar to my previous inquiry but are different, so following forum rules I post this question.
- This is a one-time task; I have asked the source to turn these into a database in the future.
- I use LibreOffice, in case that matters.
To clarify:
-
Entries of the CSV files are comma separated. None of the entries have quotation marks, and the entries for the dataN cells are decimals (e.g. 20.0).
-
The header row of the data files are:
Email,Set1,Set2,...,Set15 -
To explain what I meant by “extract”, let’s say my raw data file looks like this:
A@gmail.com,1.0,2.0,3.0,4.0 B@gmail.com,5.1,6.1,7.1,8.1 C@gmail.com,10.3,11.4,12.5,13.6Let’s say my subset of users consists of
A@gmail.com C@gmail.comAnd let’s say I want the entries for the second and third data points. Then the outfile I need is
A@gmail.com,2.0,3.0 C@gmail.com,11.4,12.5