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.
Cet exercice fait partie du cours
Analyzing Financial Statements in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Make the scatterplot
sns.___
plt.show()
plt.close()