title: Remove last char in a string for each row in pandas df
body: <p>I have a pandas dataframe with column <code>keys</code>, I need to remove the last character from each string. </p>
  
  <pre><code>id       keys     
  123      "https://www.cosmopolitan.com/entertainment/tv/a46533/"
  124      "https://www.bazaar.com/entertainment/tv/a46533/"
  </code></pre>
  
  <p>Currently, I am trying to create a function that would return a clean string and I would apply the function to df later. I tried the following:</p>
  
  <pre><code>url_test = "https://www.cosmopolitan.com/entertainment/tv/"
  
  def clean_string(url):
      for string in url:
          new_string = string[:-1]
          return new_string
  clean_string(url_test) 
  </code></pre>
  
  <p>It returns an empty string. And I want it to return <code>"url_test = "https://www.cosmopolitan.com/entertainment/tv"</code></p>