Error : ValueError: could not convert string to float: 'male'
Question/Query : I am not able to understand why programme is trying to convert object or string into float data type. What is the need to perform conversion here.
One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
Hi , I tried to understand and facing some doubts about error which getting during execution.
Below is my dtypes :
age int64
sex object
bmi float64
children int64
smoker object
region object
expenses float64
dtype: object
Index(['age', 'bmi', 'children', 'expenses', 'sex_female', 'sex_male',
'smoker_no', 'smoker_yes', 'region_northeast', 'region_northwest',
'region_southeast', 'region_southwest'],
dtype='object')
Error : ValueError: could not convert string to float: 'male'
Question/Query : I am not able to understand why programme is trying to convert object or string into float data type. What is the need to perform conversion here.
The odd that you find a specialist of your problem at hand here is very slim.
This kind of super focused question work better at stackoverflow.com/