Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Converting objects into integers in python

# Converting objects values of Stay_In_Current_City into integers and assign the result back to df

df['Stay_In_Current_City']=df['Stay_In_Current_City'].astype(int)
Comment

PREVIOUS NEXT
Code Example
Python :: django authenticate with email 
Python :: list vs tuple python 
Python :: python t test 
Python :: create virtual environment python stack overflow 
Python :: simple heatmap 
Python :: flask No application found. Either work inside a view function or push an application context 
Python :: pandas dataframe from list how to make the date column an index 
Python :: function wrapper with variable number of arguments python 
Python :: python selenium print element 
Python :: python max 
Python :: python get text of QLineEdit 
Python :: python sys 
Python :: fernet in python 
Python :: To create a SparkSession 
Python :: python extract all characters from string before a character 
Python :: pyqt set focus 
Python :: python to linux executable 
Python :: delete element from matrix python 
Python :: stack more system in python 
Python :: help() function in python 
Python :: python dictoinary add value 
Python :: a list of keys and a list of values to a dictionary python 
Python :: scatter density plot seaborn 
Python :: authentication views django 
Python :: turn False to nan pandas 
Python :: find string in list and return index python 
Python :: remove common rows in two dataframes pandas 
Python :: How do I plot a csv file in Jupyter notebook? 
Python :: data frame 
Python :: convert excel to pdf python 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =