title: Plotting data from dataframe column using matplotlib- specific start index and number of datapoints
body: <p><a href="https://archive.ics.uci.edu/ml/machine-learning-databases/00374/energydata_complete.csv" rel="nofollow noreferrer">https://archive.ics.uci.edu/ml/machine-learning-databases/00374/energydata_complete.csv</a></p>
  <p>I have this data set that shows energy data logged every 10 minutes for 4.5 months in Chievres, Belgium.</p>
  <p>I am only interested in displaying the ‘date’, ‘Appliances’, ‘lights’, and ‘T_out’ in a dataframe. The relevant code is below.</p>
  <pre><code>df=pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/00374/energydata_complete.csv')
  df=df.iloc[:,[0,1,2,21]]
  df.head(5)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/X3LVX.png" rel="nofollow noreferrer">(I'd show the df but I'm new to SO and don't know how to include output in a question, sorry :) )
  </a></p>
  <p>I'd like to create a plot using matplotlib that shows only the lights data for 4 days to see if there is a correlation between daytime and nighttime energy usage. I want to start with ‘2016-01-12 06:00:00’ am to have an accurate representation of a day.</p>
  <p>I know that the data for one day is equal to 144 data points since each point is recorded every 10 minutes, so for four days it is 576 data points.</p>
  <pre><code> fig = plt.figure()
   fig.plot(df['lights'])
  </code></pre>
  <p>This is literally the only code I have so far and I know it isn't even remotely correct lol.
  How can I graph the relevant data from the 'lights' column in the dataframe and limit the plot to 576 data points?</p>