title: Using monotonically_increasing_id() for assigning row number to pyspark dataframe
body: <p>I am using monotonically_increasing_id() to assign row number to pyspark dataframe using syntax below:</p>
  
  <pre><code>df1 = df1.withColumn("idx", monotonically_increasing_id())
  </code></pre>
  
  <p>Now df1 has 26,572,528 records. So I was expecting idx value from 0-26,572,527. </p>
  
  <p>But when I select max(idx), its value is strangely huge: 335,008,054,165.</p>
  
  <p>What's going on with this function?
  is it reliable to use this function for merging with another dataset having similar number of records?</p>
  
  <p>I have some 300 dataframes which I want to combine into a single dataframe. So one dataframe contains IDs and others contain different records corresponding to them row-wise</p>