Table.FromRows Function in Power Query
The Table.FromRows function creates a table from the list where each element of the list is a list that contains the column values for a single row.
Syntax
Table.FromRows(rows as list, optional columns as any) as table
Example:
Power Query M
let MyTable = { {1, "Ashish", "TCS"}, {2, "Katrina", "Microsoft"}, {3, "Alia", "Google"}, {4, "Vicky", "Accenture"}, {5, "Mohini", "Infosys"}, {6, "Meenakshi", "TCS"}, {7, "Esha", "TCS"}, {8, "Anjali", "Google"} } , Return = Table.FromRows(MyTable, {"CustomerID", "Name", "Compan"}) in Return
The output of the above code is shown below: