Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

as type in pandas

df.astype({'col1': 'int32'}).dtypes
col1    int32
col2    int64
dtype: object
Comment

df astype

df.astype('int64').dtypes #www.athulmathew.com
Comment

PREVIOUS NEXT
Code Example
Python :: python tar a directory 
Python :: pandas iterrows 
Python :: print alphabets in python 
Python :: convert array to set python 
Python :: How to recursively sort the elements of a stack, in Python? 
Python :: PIL image example 
Python :: delete certain characters from a string python 
Python :: Python Requests Library Put Method 
Python :: python progress bar 
Python :: convert a column to int pandas 
Python :: python check if 3 values are equal 
Python :: robust scaler 
Python :: exit in python 
Python :: python raw string 
Python :: colorbar min max matplotlib 
Python :: convert python datetime to string 
Python :: make tkinter label and input 
Python :: color name to hex python 
Python :: creating a list in python 
Python :: convert dictionary keys/values to lowercase in python 
Python :: python basic flask app 
Python :: pandas dataframe 
Python :: 1. write a program to multiply two numbers using function python 
Python :: python data structures 9.4 
Python :: how to ask a question in python 
Python :: append many items to list python 
Python :: batchnorm1d pytorch 
Python :: visitor IP address django 
Python :: django setup in windows 
Python :: Python pandas first and last element of column 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =