I'm trying to convert the specific values within its two columns: 'unemployed' and 'low_wage_jobs', in my data frame: recent_grads.
I tried the following code:
recent_grads_np = recent_grads[['unemployed','low_wage_jobs']].to_numpy()
but then I got the following error message:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
recent_grads_np = recent_grads[['unemployed','low_wage_jobs']].to_numpy()
File "<stdin>", line 3614, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_numpy'
Traceback (most recent call last):
File "script.py", line 2, in <module>
recent_grads_np = recent_grads[['unemployed','low_wage_jobs']].to_numpy()
File "script.py", line 3614, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_numpy'
why is it? and what should I write?