Skip to content

Commit

Permalink
Update src/transforms/rename.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm authored Nov 23, 2021
1 parent a34fed3 commit 6787a01
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/transforms/rename.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ function _rename(names, table)
oldnames = Tables.columnnames(table)

# check if requested renames exist in the table
diff = setdiff(keys(names), oldnames) .|> String |> Tuple
@assert length(diff) == 0
"The following column[s] were not found in the source table: $diff"
@assert keys(names) oldnames "invalid column names"

newnames = map(oldnames) do oldname
oldname in keys(names) ? names[oldname] : oldname
Expand Down

0 comments on commit 6787a01

Please sign in to comment.