xxxxxxxxxx
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# regplot
sns.regplot(data=df, x="col1", y="col2",marker='+', order=2, # For polynomial
x_jitter=0, x_estimator=np.mean, x_bins=4)
# Alternative approach : lmplot, higher level customization
sns.lmplot(data=df, x="col1", y="col2", hue="col3", col="col4")
# Residual plot : useful for evaluating the appropriateness / fit of a regression model
sns.residplot(data=df, y="col1", x = "col2", order=2)
plt.show()