0

I have a table like so

Org,1
Date,112
value A,y
value B,x
Org,2
Date,111
value B,x
Value C,y

But I need a table like so

Org,Date,Value A,Value B,Value C
1,112,y,x,,
2,111,x,,y  

How do I go about making a csv with a column header for each key, and row items for each value?

Here is an extract of the data I want to sort.

<table cellspacing="0" cellpadding="0" border="0"><tr><th>Organization</th><td>The Asahi Glass Scholarship Foundation</td>
<tr><th>Applicable scholarship year</th><td>2015-2016</td>
<tr><th>Application method</th><td>Apply through the school.</td>
<tr><th>Place of residence at the time of application</th><td>in Japan</td>
<tr><th>Academic level</th><td>Master&#039;s program, Doctoral program</td>
<tr><th>Nationality</th><td>Indonesia, Thailand, China, Korea</td>
<tr><th>Residency status</th><td>College Student</td>
<tr><th>Designated schools</th><td>28 designated universties. Consult the international student adviser.</td>
<tr><th>Combined award limitation</th><td>You cannot get another scholarship.</td>
<tr><th>Stipend (Yen)</th><td>100,000 yen for a month</td>
<tr><th>Duration (years)</th><td>Minimum years required for graduation or completion (about 2 years)</td>
<tr><th>Number of recipients</th><td>12</td>
<tr><th>Number of recipients in previous year</th><td>14/49</td>
<tr><th>Application period</th><td>February to Early April</td>
<tr><th>Application deadline</th><td>April</td>
</table><table cellspacing="0" cellpadding="0" border="0"><tr><th>Organization</th><td>Association for Asian Educational Exchange (AEE)</td>
<tr><th>Applicable scholarship year</th><td>2015-2016</td>
<tr><th>Application method</th><td>Apply through the school.</td>
<tr><th>Place of residence at the time of application</th><td>in Japan</td>
<tr><th>Academic level</th><td>Master&#039;s program</td>
<tr><th>Nationality</th><td>China</td>
<tr><th>Residency status</th><td>College Student</td>
<tr><th>Designated schools</th><td>16 universities (68 schools) (Consult the international student adviser.)</td>
<tr><th>Age limitation</th><td>Less than 35 years old</td>
<tr><th>Combined award limitation</th><td>You cannot get another scholarship. </td>
<tr><th>Other application matters</th><td>You must study social science as the major in Japan.</td>
<tr><th>Stipend (Yen)</th><td>120,000 yen for a month</td>
<tr><th>Duration (years)</th><td>1 to 2 years</td>
<tr><th>Number of recipients</th><td>│ヒᆬ¥ᄍᄇ¥ミヘ (A few)</td>
<tr><th>Number of recipients in previous year</th><td>₩ワᆰ¥ᆴレ (Not yet determined)</td>
<tr><th>Application period</th><td>January to Early March</td>
<tr><th>Application deadline</th><td>March</td>
</table>
Skins I
  • 1
  • 1
  • Do you actually intend using only HTML and CVS ?! – SnakeFoot Apr 01 '16 at 06:09
  • Hi Snakefoot. Thanks for your reply. I am attempting to scrape a website that lists scholarships, and filter all those that are not for me. The site has a insufficient search function, so I used burp proxy to spider the site, from there I exported all the responses from the scholarship details pages. I wish to load that data into a spread sheet, so I can filter it. I followed many of the methods here https://stackoverflow.com/questions/1403087/how-can-i-convert-an-html-table-to-csv/7318896# , but the CSV is laid out just as the web pages were, as in my first example. R may do this but.. – Skins I Apr 01 '16 at 13:58

0 Answers0