When i ran this i encountered the below error

Kindly review

ValueError Traceback (most recent call last)

in ()

----> 1 enc.fit(medical_df[[‘region’]])

2 enc.categories_

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing\data.py in fit(self, X, y)

1954 self

1955 “”"

→ 1956 self.fit_transform(X)

1957 return self

1958

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing\data.py in fit_transform(self, X, y)

2017 “”"

2018 return _transform_selected(X, self._fit_transform,

→ 2019 self.categorical_features, copy=True)

2020

2021 def _transform(self, X):

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing\data.py in _transform_selected(X, transform, selected, copy)

1807 X : array or sparse matrix, shape=(n_samples, n_features_new)

1808 “”"

→ 1809 X = check_array(X, accept_sparse=‘csc’, copy=copy, dtype=FLOAT_DTYPES)

1810

1811 if isinstance(selected, six.string_types) and selected == “all”:

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator)

431 force_all_finite)

432 else:

→ 433 array = np.array(array, dtype=dtype, order=order, copy=copy)

434

435 if ensure_2d:

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in **array**(self, dtype)

1779

1780 def **array**(self, dtype=None) → np.ndarray:

→ 1781 return np.asarray(self._values, dtype=dtype)

1782

1783 def **array_wrap**(self, result, context=None):

~\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core_asarray.py in asarray(a, dtype, order)

81

82 “”"

—> 83 return array(a, dtype, copy=False, order=order)

84

85

ValueError: could not convert string to float: ‘southwest’