image_output_1.png
import matplotlib.pyplot as plt

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

import seaborn as sns

lung_df = pd.read_csv('/kaggle/input/lung-cancer/survey lung cancer.csv')

lung_df = lung_df.dropna(how='any')

lung_df['LUNG_CANCER'] = lung_df['LUNG_CANCER'].map({'NO': 0, 'YES': 1})

sns.scatterplot(data=lung_df, x='AGE', y='SMOKING')
plt.xlabel('Age')
plt.ylabel('Smoking Status')
plt.title('Age vs. Smoking Status')
plt.show()