<jupyter_start><jupyter_text>Simple linear regressionsSeaborn provides a convenient interface to generate complex and great-looking statistical plots. One of the simplest things you can do using seaborn is to fit and visualize a simple linear regression between two variables using sns.lmplot().One difference between seaborn and regular matplotlib plotting is that you can pass pandas DataFrames directly to the plot and refer to each column by name. For example, if you were to plot the column 'price' vs the column 'area' from a DataFrame df, you could call `sns.lmplot(x='area', y='price', data=df)`.<jupyter_code># Import plotting modules
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
auto = pd.read_csv('./dataset/auto-mpg.csv')
# Plot a linear regression between 'weight' and 'hp'
sns.lmplot(x='weight', y='hp', data=auto)

# Display the plot
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0784313725490196, 'fraction_numerical': 0.0, 'mean_word_length': 5.611510791366906, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '17671', 'license': 'MIT', 'n_tokens_mistral': 269, 'n_tokens_neox': 257, 'n_words': 119, 'path': '6Visualization/.ipynb_checkpoints/3_Visualizing regressions_seaborn-checkpoint.ipynb', 'repo_name': 'micolsi/DataSciencePythonCourse', 'size': '918'}