title: SyntaxError: unexpected EOF while parsing
body: <p>I am getting an error while running this part of the code. I tried some of the existing solutions, but none of them helped.</p>
  <pre><code>elec_and_weather = pd.read_csv(r'C:\HOUR.csv', parse_dates=True,index_col=0)
  # Add historic DEMAND to each X vector
   for i in range(0,24):
      elec_and_weather[i] = np.zeros(len(elec_and_weather['DEMAND']))
      elec_and_weather[i][elec_and_weather.index.hour==i] = 1
  # Set number of hours prediction is in advance
  n_hours_advance = 24
  
  # Set number of historic hours used
  n_hours_window = 24
  
  for k in range(n_hours_advance,n_hours_advance+n_hours_window):
      elec_and_weather['DEMAND_t-%i'% k] = np.zeros(len(elec_and_weather['DEMAND']))'
  </code></pre>
  <p>I always get this error:</p>
  <pre><code>for i in range(0,24):
  File &quot;&lt;ipython-input-29-db3022a769d1&gt;&quot;, line 1
  for i in range(0,24):
                       ^
  SyntaxError: unexpected EOF while parsing
  
  File &quot;&lt;ipython-input-25-df0a44131c36&gt;&quot;, line 1
      for k in range(n_hours_advance,n_hours_advance+n_hours_window):
                                                                     ^
  SyntaxError: unexpected EOF while parsing
  </code></pre>