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 :: how do i get parent directory python 
Python :: download from colab to local drive 
Python :: python filter data from list 
Python :: how to search in django 
Python :: python tkinter projects 
Python :: python arguments 
Python :: Python, importing other scripts from other directories 
Python :: django query multiple conditions 
Python :: subtract current date from pandas date column 
Python :: entered_text_1 = textbox_1.get(1.0, tk.END+"-1c") 
Python :: run in thread decorator 
Python :: convert csv file into python list 
Python :: how print 2 decimal in python 
Python :: check if file is txt python 
Python :: selenium webdriver scroll down python 
Python :: string remove in python 
Python :: Cast image to float32 
Python :: how to unlist a list in python 
Python :: how to play and stop music python 
Python :: Sending POST request in Django 
Python :: django form list option 
Python :: if number is divisible by 3 python 
Python :: python put console window on top 
Python :: input in one line python 
Python :: kubernetes python client 
Python :: uploading folder in google colab 
Python :: how to get key value in nested dictionary python 
Python :: factorial of a number in python 
Python :: tree to tuple python 
Python :: how to stop a program after 1 second in python 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =