inputs_array, targets_array = dataframe_to_arrays(dataframe)
inputs_array, targets_array
KeyError Traceback (most recent call last)
in ()
----> 1 inputs_array, targets_array = dataframe_to_arrays(dataframe)
2 inputs_array, targets_array
3 frames
/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing)
1296 if missing == len(indexer):
1297 axis_name = self.obj._get_axis_name(axis)
-> 1298 raise KeyError(f"None of [{key}] are in the [{axis_name}]")
1299
1300 # We (temporarily) allow for some missing keys with .loc, except in
KeyError: “None of [Index([(‘age’, ‘sex’, ‘bmi’, ‘children’, ‘smoker’, ‘region’, ‘charges’)], dtype=‘object’)] are in the [columns]”