88815/how-to-convert-a-list-into-an-array-in-python
Hi Guys,
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?
Hi@akhtar,
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]] import numpy arr = numpy.array(db)
You could try using the AST module. ...READ MORE
If you are using Python 3.x then ...READ MORE
Hey, 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
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
Hi@akhtar You can convert a dictionary dataset into ...READ MORE
Hi@akhtar, You can convert your dataframe into list. ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.