The easiest way to get this would be to use Grouping/Ungrouping - however, this wouldn't get it perfectly like you requested, but it should be able to be used very similarly.
Something like:
ClearCollect(*Collection*, GroupBy(*DataSource*, DatasetNo))
To get strictly what you wanted, with columns for each field, as long as you know the names of all fields going in, you could do a forall where you check what the field name is, check if a record with that datasetno exists yet, and if it does patch to that record, otherwise create a new one. Something along the lines of:
ForAll(
*DataSource* As DS,
Switch(
DS.FieldName,
"Name",
If(
CountIf(*Collection*, DatasetNo = DS.DatasetNo) = 0,
Collect(*Collection*, {DatasetNo: DS.DatasetNo, Name: DS.Value}),
Patch(*Collection*, LookUp(*Collection*, DatasetNo = DS.DatasetNo), {Name: DS.Value})
),
"Company",
If(
CountIf(*Collection*, DatasetNo = DS.DatasetNo) = 0,
Collect(*Collection*, {DatasetNo: DS.DatasetNo, Company: DS.Value}),
Patch(*Collection*, LookUp(*Collection*, DatasetNo = DS.DatasetNo), {Company: DS.Value})
),
"Email",
If(
CountIf(*Collection*, DatasetNo = DS.DatasetNo) = 0,
Collect(*Collection*, {DatasetNo: DS.DatasetNo, Email: DS.Value}),
Patch(*Collection*, LookUp(*Collection*, DatasetNo = DS.DatasetNo), {Email: DS.Value})
)
)
)
This is obviously a lot longer(and maybe there's a nicer way, but this is what I thought of first), but something like it should convert your first table to your second, in the form of a collection.
Hope this helps!