title: convert pandas float series to int
body: <p>I am discretizing my series for a learner.  I really need the series to be in float, and I <strong>really</strong> need to avoid for loops.</p>
  
  <p>How do I convert this series from float to int?  </p>
  
  <p>Here is my function that is currently failing:</p>
  
  <pre><code>def discretize_series(s,count,normalized=True):
      def discretize(value,bucket_size):
          return value % bucket_size
      if normalized:
          maximum = 1.0
      else:
          minimum = np.min(s)
          s = s[:] - minimum
          maximum = np.max(s)
      bucket_size = maximum / float(count)
  </code></pre>
  
  <p>Here is the line that causes the function to fail:</p>
  
  <pre><code>    s = int((s[:] - s[:] % bucket_size)/bucket_size)
  </code></pre>
  
  <p>The int() induces a casting error: I am unable to cast the pandas series as an int series. </p>
  
  <pre><code>    return s
  </code></pre>
  
  <p>If I remove the int(), the function works, so I may just see if I can get it to work anyway. </p>