Hi,
I am trying to find subset of dataframe having elements with Number datatypes. But I couldn’t find any single function to find the subset. So I have implemented as
#df is the dataframe with columns having Number and string datatypes
nm = names(df)
new_nm = String[]
for (idx, ec) in enumerate(eachcol(df))
if (eltype(ec) <:Number)
push!(new_nm,nm[idx])
end
end
df_numeric_columns = df[!,new_nm]
Is there any better code or function to find out Number type columns?
Thanks in Advance!,
Manu