Answers for "float() argument must be a string or a number, not 'dict_values'"

-1

float() argument must be a string or a number, not 'dict_values'

>>> np.array(list(d.values())).astype(float)
array([ 2.,  4.])
Posted by: Guest on April-28-2020
-1

float() argument must be a string or a number, not 'dict_values'

>>> np.array(d.values())
array(dict_values([2, 4]), dtype=object)
Posted by: Guest on April-28-2020

Code answers related to "float() argument must be a string or a number, not 'dict_values'"

Python Answers by Framework

Browse Popular Code Answers by Language