Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convert data type of a column in pandas

# You can use "astype" method
# suppose you want to correct your "sales" column data type
df['sales'] = df['sales'].astype('float64')
Source by buggyprogrammer.com #
 
PREVIOUS NEXT
Tagged: #convert #data #type #column #pandas
ADD COMMENT
Topic
Name
7+1 =