IndentationError: unexpected indent in fcc Sea level predictor project

Please help me. New in this field and asking 1st time on this platform.

My code

import pandas as pd
import matplotlib.pyplot as plt
from scipy.stats import linregress

def draw_plot():
    # Read data from file
  df=pd.read_csv("epa-sea-level.csv")
    # Create scatter plot
    xpoints=df["Years"]
    ypoints=df["CSIRO Adjusted Sea Level"]
    plt.scatter(xpoints, ypoints) 

    # Create first line of best fit
  res= linregress(xpoints,ypoints)
  print(res)
  x_pred=pd.Series([i for i in range(1880,2051)])
  y_pred=res.slope*x_pred + res.intercept

  plt.plot(x_pred, y_pred,"r")
   
  # Create second line of best fit
  new_df=df.loc[df["Year"]>=2000]
  new_x=new_df["Year"]
  new_y=new_df["CSIRO Adjusted Sea Level"]
  res_2= linregress(new_x,new_y)
  x_pred2=pd.Series([i for i in range(2000,2050)])
  y_pred2=res_2.slope*x_pred2 + res_2.intercept

  plt.plot(x_pred2, y_pred2,"green")

    # Add labels and title
  plt.xlabel("Year")
  plt.ylabel("Sea Level (inches)")
  plt.title("Rise in Sea Level")
  plt.legend(fontsize="medium")
  plt.show()  
    
    # Save plot and return data for testing (DO NOT MODIFY)
    plt.savefig('sea_level_plot.png')
    return plt.gca()

Error: xpoints=df["Years"] ^ IndentationError: unexpected indent

Link of my replit : https://replit.com/@LavishSinghal/boilerplate-sea-level-predictor-1#sea_level_predictor.py

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum