Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

converting string array to int array python

T1 = ['13', '17', '18', '21', '32'] #list with numbers stored as string

T3 = list(map(int, T1))
print(T3) #prints [13, 17, 18, 21, 32]

#or
T4 = [int(x) for x in T1]
print(T4) #prints [13, 17, 18, 21, 32]
Comment

python ndarray string array into int

y = y.astype(np.uint8)
Comment

PREVIOUS NEXT
Code Example
Python :: import python module from another directory 
Python :: The path python2 (from --python=python2) does not exist 
Python :: get all files within multiple directories python 
Python :: how to print alternate numbers in python 
Python :: django.core.exceptions.FieldError: Unknown field(s) (author) specified for Comment 
Python :: fstring number format python 
Python :: python split tuples into lists 
Python :: python for loop backwards 
Python :: finding if user input is lower or upper in python 
Python :: floyd triangle python 
Python :: reduce in python 
Python :: np replace nan 
Python :: pyqt5 math 
Python :: drop a column from dataframe 
Python :: how to know if the numbers is par in python 
Python :: supprimer ligne python dataframe 
Python :: django password change view 
Python :: isprime in python 
Python :: internet explorer selenium 
Python :: How to create a hyperlink with a Label in Tkinter 
Python :: how to make square shape python 
Python :: knn classifier python example 
Python :: pil overlay images 
Python :: researchpy correlation 
Python :: add y axis label matplotlib 
Python :: decrypt python code 
Python :: converting pandas._libs.tslibs.timedeltas.Timedelta to days 
Python :: change value to string pandas 
Python :: python emoji 
Python :: python stop daemon thread 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =