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

df = pd.read_csv('../input/travel insurance.csv')
df1 = df

df.fillna('Not Specified', inplace=True)

df.isnull().sum()

df_numerical = df._get_numeric_data()

df.loc[df['Duration'] < 0, 'Duration'] = 49.317

df.loc[df['Net Sales'] == 0.0, 'Commision (in value)'] = 0

test = [(df[df['Gender'] == 'Not Specified']['Claim'].value_counts() / len(df[df['Gender'] == 'Not Specified']['Claim']))[1], (df[df['Gender'] == 'M']['Claim'].value_counts() / len(df[df['Gender'] == 'M']['Claim']))[1], (df[df['Gender'] == 'F']['Claim'].value_counts() / len(df[df['Gender'] == 'F']['Claim']))[1]]
test