text_html_output_1.png
import matplotlib.pyplot as plt

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

lang = pd.read_csv('/kaggle/input/language-learning/language.csv', encoding='iso-8859-1')
lang

lang['morph'] = lang['morph'].fillna(0.0501)
lang['new_feat'] = lang['new_feat'].fillna(14.4)
lang['new_sounds'] = lang['new_sounds'].fillna(20.1)

lang.drop_duplicates()

import matplotlib.pyplot as plt
subset_lang = lang[['LoR', 'Edu.day', 'Speaking']]
subset_lang = subset_lang.dropna()
plt.scatter(subset_lang['LoR'], subset_lang['Speaking'], c=subset_lang['Edu.day'], cmap='viridis')
plt.xlabel('Length of Residence (LoR)')
plt.ylabel('Speaking Proficiency Score')
plt.colorbar(label='Formal Education Days (Edu.day)')
plt.title('Relationship between LoR, Edu.day, and Speaking Proficiency Score')
plt.show()