text_html_output_1.png
import pandas as pd

df = pd.read_csv('/kaggle/input/diabetes-prediction-dataset/diabetes_prediction_dataset.csv')

df = df[df.gender != 'Other']
df['gender'].replace(['Female', 'Male'], [0, 1], inplace=True)
df.smoking_history.replace(['No Info', 'never', 'former', 'current', 'not current', 'ever'], [0.5, 0, 0.5, 1, 0.5, 0.5], inplace=True)

df.head(20)