Skip to content

Instantly share code, notes, and snippets.

@cbaragao
Created February 17, 2024 03:31
Show Gist options
  • Select an option

  • Save cbaragao/6b42c63519d4437b147295b6efa955f4 to your computer and use it in GitHub Desktop.

Select an option

Save cbaragao/6b42c63519d4437b147295b6efa955f4 to your computer and use it in GitHub Desktop.
/*
This function takes a table and renames snake case column names by
replacing the underscore with a space
*/
(tbl as table)=>
let
rename = Table.RenameColumns(
tbl,
List.Zip(
{
Table.ColumnNames(tbl),
List.Transform(
Table.ColumnNames(tbl),
each Text.Replace(_, "_", " ")
)
}
)
)
in
rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment