Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python: transform as type numeirc

df['myvar'] = df['myvar'].astype(str)   # Transform as character
df['myvar'] = df['myvar'].astype(float) # Transform as float
df['myvar'] = df['myvar'].astype(int)   # Transform as numeric
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #transform #type #numeirc
ADD COMMENT
Topic
Name
3+5 =