title: Get column names from DataFrame or JuliaDB table
body: <p>How do I get the column names from a <code>DataFrame</code> object or JuliaDB <code>IndexedTable</code> object? Is this possible?</p>
  
  <p><hr>
  Reproducible Code:</p>
  
  <pre class="lang-py prettyprint-override"><code>using JuliaDB
  import DataFrames
  DF = DataFrames
  
  # CREATES AN EXAMPLE TABLE WITH JULIADB
  
  colnames = [:samples, :A, :B, :C, :D]
  primary_key = [:samples]
  coltypes = [Int[], Float64[],Float64[],Float64[],Float64[]]
  sample_sizes = [100,200,300]
  example_values = (1, 0.4, 0.3, 0.2, 0.1)
  
  mytable = table(coltypes..., names=colnames, pkey=primary_key) # initialize empty table
  
  # add some data to table
  for i in sample_sizes
      example_values = (i, 0.4, 0.3, 0.2, 0.1)
      table_params = [(col=&gt;val) for (col,val) in zip(colnames, example_values)]
  
      push!(rows(mytable), (; table_params...)) # add row
      mytable = table(mytable, pkey = primary_key, copy = false) # sort rows by primary key
  end
  mytable = table(unique(mytable), pkey=primary_key) # remove duplicate rows which don't exist
  
  # MAKES A DATAFRAME FROM JULIADB TABLE
  
  df = DF.DataFrame(mytable)
  </code></pre>
  
  <p>For instance, given the above code, how would you check with a conditional if there's a column <code>:E</code> in either <code>mytable</code> or <code>df</code>, (for the purposes of adding such a column if it doesn't exist yet)?</p>
  
  <p>Ultimately, I'm looking for the Julia equivalent of the following Python code:</p>
  
  <pre class="lang-py prettyprint-override"><code>if 'E' in df.columns:
       # ...
  else:
       # ...
  
  </code></pre>