title: What is the difference between rowsBetween and rangeBetween?
body: <p>From the PySpark docs <a href="https://spark.apache.org/docs/latest/api/python/pyspark.sql.html?highlight=rangebetween#pyspark.sql.WindowSpec.rangeBetween" rel="noreferrer"><code>rangeBetween</code></a>:</p>
  
  <blockquote>
    <p><code>rangeBetween(start, end)</code></p>
    
    <p>Defines the frame boundaries, from start (inclusive) to end (inclusive).</p>
    
    <p>Both start and end are relative from the current row. For example, “0” means “current row”, while “-1” means one off before the current row, and “5” means the five off after the current row.</p>
    
    <p>Parameters:    </p>
    
    <ul>
    <li>start – boundary start, inclusive. The frame is unbounded if this is -sys.maxsize (or lower).</li>
    <li>end – boundary end, inclusive. The frame is unbounded if this is sys.maxsize (or higher).
    New in version 1.4.</li>
    </ul>
  </blockquote>
  
  <p>while <a href="https://spark.apache.org/docs/latest/api/python/pyspark.sql.html?highlight=rowsbetween#pyspark.sql.Window.rowsBetween" rel="noreferrer"><code>rowsBetween</code></a></p>
  
  <blockquote>
    <p><code>rowsBetween(start, end)</code></p>
    
    <p>Defines the frame boundaries, from start (inclusive) to end (inclusive).</p>
    
    <p>Both start and end are relative positions from the current row. For example, “0” means “current row”, while “-1” means the row before the current row, and “5” means the fifth row after the current row.</p>
    
    <p>Parameters: </p>
    
    <ul>
    <li>start – boundary start, inclusive. The frame is unbounded if this is -sys.maxsize (or lower).</li>
    <li>end – boundary end, inclusive. The frame is unbounded if this is sys.maxsize (or higher).
    New in version 1.4.</li>
    </ul>
  </blockquote>
  
  <p>For <code>rangeBetween</code> how is "1 off" different from "1 row", for example?</p>