title: Want to make a for loop for the same data set for different restrictions
body: <p>I have a data set where I am restricting what rows the data set reads:</p>
  
  <pre><code># Use pandas to read in csv file
  data_df_0 = pd.read_csv('data_set.csv')
  #create data subsets based on specific buoy coordinates
  data_df_1 = pd.read_csv('data_set.csv', skiprows=range(9,114))
  data_df_2 = pd.read_csv('data_set.csv', skiprows=([i for i in range(1, 8)] + [j for j in range(21, 114)]))
  </code></pre>
  
  <p>I now what to write a for loop to assign different values based on the different dataset, my current attempt at the code is</p>
  
  <pre><code># Assign variables according to header line (i.e., first row)
  for x in range (0,2):
      lon_x = data_df_x['longitude']
      lat_x = data_df_x['latitude']
  </code></pre>
  
  <p>which gave me the error</p>
  
  <pre><code>---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-59-3f7a5140aca4&gt; in &lt;module&gt;
       18 # Assign variables according to header line (i.e., first row)
       19 for x in range (0,2):
  ---&gt; 20     lon_x = data_df_x['longitude']
       21     lat_x = data_df_x['latitude']
       22 #     w_temp_x = data_df_x['temp (c)']
  
  NameError: name 'data_df_x' is not defined
  </code></pre>
  
  <p>Where did I go wrong and what do I need to do to fix this?</p>