Hello everyone,
I am very grateful if anyone can help.
My data have 600 stockcodes, saved as "allstock.csv". I want to extract 100 stockcodes in file "selectstock.csv" which then contain all data in file allstock.csv.
For example: file "allstock.csv" is something like that
stockcode | offerprice | openprice | closeprice | openoffer | closeopen |
---|---|---|---|---|---|
AAA | 48.7 | 51 | 48.7 | 1.047227926 | 0.954901961 |
AAM | 38 | 45.6 | 45.6 | 1.2 | 1 |
ABT | 90 | 90 | 90 | 1 | 1 |
ACB | 130.2 | 120 | 135 | 0.921658986 | 1.125 |
ACC | 25 | 28.5 | 28.5 | 1.14 | 1 |
ACL | 81 | 81 | 81 | 1 | 1 |
ACM | 10.5 | 11.6 | 10.5 | 1.104761905 | 0.905172414 |
ADC | 10.8 | 16.5 | 11.3 | 1.527777778 | 0.684848485 |
ADS | 17 | 18 | 13.7 | 1.058823529 | 0.761111111 |
AGF | 30 | 30 | 30 | 1 | 1 |
AGM | 20 | 16 | 20.2 | 0.8 | 1.2625 |
And "selectstock.csv"
stock |
---|
AAA |
ACC |
ADS |
AGM |
I would like to get new file like that.
stockcode | offerprice | openprice | closeprice | openoffer | closeopen |
---|---|---|---|---|---|
AAA | 48.7 | 51 | 48.7 | 1.047227926 | 0.954901961 |
ACC | 25 | 28.5 | 28.5 | 1.14 | 1 |
ADS | 17 | 18 | 13.7 | 1.058823529 | 0.761111111 |
AGM | 20 | 16 | 20.2 | 0.8 | 1.2625 |
Thank you in advance.