# Going from Dataset back to underlying Associations [closed]

In attempting to scrape data from a Wikipedia table for conversion into a Dataset, I discovered that the simple program posted in another thread works rather well.

 text2 = Import[
"https://en.wikipedia.org/wiki/List_of_solar_thermal_power_\
stations", "Data"];
table2 = Cases[text2, {_, _, _, _, _,   _, _}, \[Infinity]]
Dataset[table2[[2 ;; 74]]][All,


However, on closer inspection I note that the data [XML?] for the table appears not to be well formed and consequently some rows in the table are actually missing (ignore the fact that I intentionally dropped the first and a few at the end that were actually text and not part of the scraped table, hence the [[2;;74]]).

Its seems that the easiest way to deal with this complicated table, given that attempts to import as an XMLObject were stymied by the complexity of the table, which appears to have numerous XMLElements of differing size (invalid XML?), might be to simply store the Dataset as an association, edit that for the few missing records and then translate the list of associations back to a new revised dataset.

Is there a simple function that permits one to retrieve the associations (key, value) pairs from the dataset so that they could be edited and the Dataset rebuilt?

Normally one doesn't need to do this since one starts with an association to get the Dataset as is evident in numerous examples in the documentation. However, I am confused as to how to retrieve/write out the intrinsic list of associations so that the corrections can be readily made to the intrinsic association list so that the revised list of associations could then be used to create a new corrected dataset.

Although one could seemingly merge two datasets with the same underlying structure to add a few missing records, this does not seem to resolve a few problem incomplete records that still have found their way into the table during the translation. Consequently,it would seem gaining access and storing the association list, editing it, and then rebuilding the Dataset would be the easiest way to deal with problematic tables of this kind.

• Without checking details, is Normal the answer? – Kuba Feb 9 '17 at 11:28
• You may find this answer of interest. – m_goldberg Feb 9 '17 at 11:36
• This is EXACTLY what I was seeking. I had glanced at your earlier post and at the Normal documentation but it had not sunk in. Thank you. I see in the Tour that I can mark this question as now answered, but don't see exactly where on this page I should do so. – Stuart Poss Feb 9 '17 at 17:33
• Possible duplicate of Change Values in Dataset under Condition – Kuba Feb 10 '17 at 12:49