title: Julia: Apply function to every cell within a DataFrame (without loosing column names)
body: <p>I am diving into Julia, hence my "novice"-question.</p>
  
  <p>Coming from R and Python, I am used to apply simple functions (arithmetic or otherwise) to entire <code>pandas.DataFrame</code>s and <code>data.frame</code>s, respectively.</p>
  
  <pre class="lang-py prettyprint-override"><code>#both R and Python
  df - 1               # returns all values -1, given all values are numeric
  df == "someString"   # returns a boolean df
  </code></pre>
  
  <p>a bit more complex </p>
  
  <pre class="lang-py prettyprint-override"><code>#python
  df = df.applymap(lambda v: v - 1 if v &gt; 1 else v)
  </code></pre>
  
  <pre class="lang-r prettyprint-override"><code>#R
  df[] &lt;- lapply(df, function(x) ifelse(x&gt;1,x-1,x))
  </code></pre>
  
  <p>The thing is, I don't know how to do this in Julia, I don't find analogue solutions easily on the web. And Stackoverflow helps a lot when using Google. So here it is. How do I do it in Julia? </p>
  
  <p>Thanks for your help!</p>
  
  <p>PS:</p>
  
  <p>So far I have come up with the following solutions, where I loos my column names.</p>
  
  <pre><code>DataFrame(colwise(x -&gt; x .-1, df))
  
  # seems like to much code for only subtracting 1 and loosing col names
  </code></pre>