Practice with sns.regplot()
In this exercise, you will check for any relationship between the operating margin and debt-to-equity ratio for all the companies in our dataset. You will first make a scatter plot to analyze the relationship and will be able to discern a relatively clear positive relationship between the debt-to-equity ratio and operating margin. Then you will use sns.regplot
to get a line of best fit to confirm or reject the hypothesis that there is a positive relationship between the two ratios.
The pandas
DataFrame dataset
is loaded with debt-to-equity and operating margin ratio already computed. pandas
and seaborn
is loaded with alias pd
and sns
respectively.
This exercise is part of the course
Analyzing Financial Statements in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Make the scatterplot
sns.___
plt.show()
plt.close()