text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))

asus.shape

asus.drop(columns=['Unnamed: 0'])

b = asus['Newspaper Ad Budget ($)'].quantile(0.98)
asus_new = asus[asus['Newspaper Ad Budget ($)'] < b]

asus_new.isnull().sum() * 100 / asus_new.shape[0]

asus_new.duplicated().sum()

asus_new.drop(columns=['Unnamed: 0'])

sns.pairplot(asus_new, x_vars=['TV Ad Budget ($)', 'Radio Ad Budget ($)', 'Newspaper Ad Budget ($)'], y_vars='Sales ($)', height=5, aspect=0.5, kind='scatter')
plt.show()