title: What is the way to add an index column in Dask when reading from a CSV?
body: <p>I'm trying to process a fairly large dataset that doesn't fit into memory using Pandas when loading it at once so I'm using Dask. However, I'm having difficulty in adding a unique ID column to the dataset once read when using the read_csv method. I keep getting an error (see Code). I'm trying to create an index column so I can set that new column as the index for the data, but the error appears to be telling me to set the index first before creating the column.</p>
  <h1>CODE</h1>
  <pre><code>df = dd.read_csv(r'path\to\file\file.csv')  # File does not have a unique ID column, so I have to create one.
  df['index_col'] = dd.from_array(np.arange(len(pc_df)))  # Trying to add an index column and fill it
  # ValueError: Not all divisions are known, can't align partitions. Please use `set_index` to set the index.
  </code></pre>
  <h3>Update</h3>
  <p>Using <code>range(1, len(df) + 1</code> changed the error to: TypeError: Column assignment doesn't support type range</p>