title: Is it possible to have a function that gets any data frame and any column as its inputs using Pandas in Python?
body: <p>Imagine we have a dataframe like this:</p>
  
  <pre><code> my_df&gt;&gt;  
  
    column_1   column_2 column_3  column_4
  0  0.276162  0.552951  0.866023  0.571535
  1  0.112933  0.549487  0.626958  0.988705
  2  0.916932  0.561641  0.220696  0.545019
  </code></pre>
  
  <p>Can I have a function that can get any dataframe like this one with any column of it as its input?  </p>
  
  <p>To clarify better, if I have a function like this:</p>
  
  <pre><code>def multiply_5(df,column):
      df.column=df.column.apply(lambda x:x*5-3)
  </code></pre>
  
  <p>Does it work if I use it any similar way like this? :</p>
  
  <pre><code>multiply_5(my_df,column_2)
  </code></pre>
  
  <p>in order to get this:</p>
  
  <pre><code>my_df.column_2=my_df.column_2.apply(lambda x:x*5-3)
  </code></pre>
  
  <p>I know this specific way I wrote does not work, but is there any easy way to use this function for other data frames?</p>