I am looking for a solution to handle with when column name is not exist in Julia dataframes.
In more detail, let's say I have following dataframes and list :
df = DataFrame(id= "12345", description= rand(5));
err_Li = ["12345"]
I need to check whether id column is match with err_Li such as :
if (df[1,"id"] in err_Li)
println("NOT VALID")
else
end
However, in some of my dataframes, column name id is not exist. So that in Python, I can handle with try-except such as :
try :
if df['id'][0] in err_Li:
print('err')
else: pass
except : pass
How can I do control flow when column name is not exist in Julia dataframe or is there equivalent function with try-except in Python ?