#The jointplot allows us to create a scatter plot. The x is the column of the #df that we would like to have on the x-axis. #The y is the column of the dataframe that we would like on the y-axis. #The data is the dataframe we are deriving the values from. #The kind is assigned as reg since we want to create a regression sns.jointplot(x='QQQ', y='SPY', data=df, kind='reg') plt.show()
Here is what the above code is Doing:
1. We are creating a jointplot using the seaborn library.
2. We are using the x and y parameters to specify which columns of the dataframe
we want to use for the x and y axis.
3. We are using the data parameter to specify which dataframe we want to use.
4. We are using the kind parameter to specify that we want to create a regression.