title: Create bins with 1 percentage increments?
body: <p>I have a dataframe with column activity_percentage of a customer. This range is from 0-100%. Now, I want to create bin for each percentage but my current approach will require me to manually create 100 bins which is probably not the best way. How can I achieve this in a more programmatic way?</p>
  <pre><code>def conditions(x):
      if   x &gt;=0 and  x&lt;=0.01:   return &quot;0-1%&quot;
      elif x &gt;0.01 and x&lt;=0.02:   return &quot;1-2%&quot;
      elif x &gt;0.02 and x&lt;=0.03:   return &quot;2-3%&quot;
      ....                        return 99-100%
      else:
        return &quot;error&quot;
  </code></pre>