title: Apply function to all columns of a Polars-DataFrame
body: <p>I know how to apply a function to all columns present in a <strong>Pandas-DataFrame</strong>. However, I have not figured out yet how to achieve this when using a <strong>Polars-DataFrame</strong>.</p>
  <p>I checked the <a href="https://pola-rs.github.io/polars-book/user-guide/howcani/apply/udfs.html" rel="nofollow noreferrer">section</a> from the <a href="https://pola-rs.github.io/polars-book/user-guide/index.html" rel="nofollow noreferrer">Polars User Guide</a> devoted to this topic, but I have not find the answer. Here I attach a code snippet with my unsuccessful attempts.</p>
  <pre><code>import numpy as np
  import polars as pl
  import seaborn as sns
  
  # Loading toy dataset as Pandas DataFrame using Seaborn
  df_pd = sns.load_dataset('iris')
  
  # Converting Pandas DataFrame to Polars DataFrame
  df_pl = pl.DataFrame(df_pd)
  
  # Dropping the non-numeric column...
  df_pd = df_pd.drop(columns='species')                     # ... using Pandas
  df_pl = df_pl.drop('species')                             # ... using Polars
  
  # Applying function to the whole DataFrame...
  df_pd_new = df_pd.apply(np.log2)                          # ... using Pandas
  # df_pl_new = df_pl.apply(np.log2)                        # ... using Polars?
  
  # Applying lambda function to the whole DataFrame...
  df_pd_new = df_pd.apply(lambda c: np.log2(c))             # ... using Pandas
  # df_pl_new = df_pl.apply(lambda c: np.log2(c))           # ... using Polars?
  </code></pre>
  <p>Thanks in advance for your help and your time.</p>