|
- let
- Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Werp88tMJve/3zHq6dtnzKfMdlXSUlGJ1opWeL5/4fPY6IO9Zx4Tnu1eCxV6sX/tsWjtQzNxYzwAs8mzqBqA+oIilCVTkRfdGoDKgiIWFnilYBM0GJ6JsMMOwwcIS3QZLQ5BILAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
- #"Added Index" = Table.AddIndexColumn(Source, "Index", 0, 1, Int64.Type),
- #"Grouped per student" = let delim = List.PositionOf(#"Added Index"[Column1], "姓名", 2, (x,y) => Text.Contains(x,y)) in Table.Group(#"Added Index", {"Index","Column1"}, {"Grp", each Table.PromoteHeaders(Table.Skip(_))}, 0, (x,y) => Byte.From(List.Contains(delim, y[Index]))),
- #"Expanded Grp" = Table.ExpandTableColumn(#"Grouped per student", "Grp", {"科目", "成绩"}, {"科目", "成绩"}),
- #"Extracted Text After Delimiter" = Table.TransformColumns(Table.RemoveColumns(#"Expanded Grp",{"Index"}), {{"Column1", each Text.AfterDelimiter(_, ":"), type text}})
- in
- #"Extracted Text After Delimiter"
复制代码 |
|