I am new to Machine Learning. I have one list. I want to convert the list into a NumPy array. How can I do that?
You need to import the NumPy module in your code. This module can convert a list into an array as shown below.
db = [['abc',10,20],['def',30,40],['ghi',40,50]]
arr = numpy.array(db)
You could try using the AST module. ...READ MORE
If you are using Python 3.x then ...READ MORE
To split a string you can use ...READ MORE
Python doesn't have a native array data ...READ MORE
suppose you have a string with a ...READ MORE
You can also use the random library's ...READ MORE
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
You can convert a dictionary dataset into ...READ MORE
You can convert your dataframe into list. ...READ MORE
Already have an account? Sign in.