Query.jl
Query.jl copied to clipboard
Names with spaces
everything goes well with simple column names like "Name", "Full_Name", "Age", but i cant get it done when i have field names with spaces like "Full Name", "ID Number". This works,
df = x |>
@filter(_.Age > 2) |>
@map({_.Name}) |>
DataFrame
this does not work:
df = x |>
@filter(_.Age> 2) |>
@map({_."Full Name"}) |>
DataFrame
What i am doing wrong?
You could do
x |> @filter(_.Age>2) |> @select(occursin("Full Name")) |> DataFrame
It could be handy to have helper function/macro to clean the column names. Like this... https://cran.r-project.org/web/packages/janitor/vignettes/janitor.html#clean-data.frame-names-with-clean_names
Edit: similar to #272