Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

dtype in pandas

df = pd.DataFrame({'float': [1.0],
                   'int': [1],
                   'datetime': [pd.Timestamp('20180310')],
                   'string': ['foo']})
df.dtypes
float              float64
int                  int64
datetime    datetime64[ns]
string              object
dtype: object
Comment

df dtype

d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df.dtypes
col1    int64
col2    int64
dtype: object
Comment

PREVIOUS NEXT
Code Example
Python :: datetime to epoch 
Python :: trim all new rows string python 
Python :: how to check system has internet using python 
Python :: Python Global in Nested Functions 
Python :: how to use drive link in pandas dataframe 
Python :: show only integer values matplotlib 
Python :: how to access app.config globally in flask app 
Python :: how to convert data into numerical dataset 
Python :: tensorflow io check file exist 
Python :: python concatenate list of lists 
Python :: python manage.py collectstatic 
Python :: concat Pandas Dataframe with Numpy array. 
Python :: gdscript fixed decimal 
Python :: Python __floordiv__ magic method 
Python :: dependency inversion 
Python :: how to change theme of jupyter notebook 
Python :: add space before and after string python 
Python :: Python NumPy ndarray.T Example to convert an array 
Python :: objects and classes in python 
Python :: The function to be built, amino_acids, must return a list of a tuple and an integer when given a string of mRNA code. 
Python :: one function in numpy array 
Python :: fillna pandas inplace 
Python :: Django Redirect Depending On Request Method 
Python :: decision tree 
Python :: python string [::-1] 
Python :: python derivative of mean squared error 
Python :: python db access though ssh user 
Python :: python identify image mode 
Python :: getting last n rows of column 
Python :: find in python 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =