title: How to extract ranges with specific length from dataframe row in python?
body: <p>Here is a first 10 columns of my dataframe:</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({
      '0': [373.60],
      '1': [442.83],
      '2': [259.21],
      '3': [293.05],
      '4': [332.79],
      '5': [360.03],
      '6': [676.55],
      '7': [481.67],
      '8': [486.59],
      '9': [561.65],
      '10': [491.75]})
  </code></pre>
  
  <p>And so on, actually my df contains 100000 columns. Min is a 109.59, and max is a 1703.35.</p>
  
  <p>I want to slice df into specific ranges with length of 3.98, and then define a ragne that contain a maximum amount of values.
  I mean, the ranges must be like:</p>
  
  <pre><code># converting df to array
  df_array = np.array(df)
  
  # defining ranges like:
  range_length=3.98
  range_1 = df_array.min() + range_length
  range_2 = range_1 + range_lenght
  ...
  range_n = df_array.max() - range_n-1
  </code></pre>
  
  <p>And then I see that some range_150 contains about 1200 values, which is a most frequent distribution range that I need.</p>
  
  <p>And thet I need to define index of each value from that range in my df..</p>
  
  <p>Really haven't any ideas how to do that. Looks like need create several functions. Can somebody help please?</p>