Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python: check type and ifno of a data frame

df.shape
df.info()
df.dtypes
des = df.describe()                        # Summary
des_num = df.describe(include=[np.number]) # Include only numerical columns
des_obj = df.describe(include=[np.object]) # Include only string columns
des_obj.transpose()

# Show list of variable / columns in DF
df.columns

# Count number of variables / columns in DF
len(df.columns)

# Count variable
df["myvar"].value_counts()
Comment

PREVIOUS NEXT
Code Example
Python :: python read excel sheet name 
Python :: how to read a .exe file in python 
Python :: pygame window 
Python :: random string generator python 
Python :: python truncate to integer 
Python :: convert list to binary python 
Python :: sqlalchemy if a value in list of values 
Python :: parcourir une liste par la fin python 
Python :: minute range python 
Python :: how to get width of an object in pyqt5 
Python :: append a line to a text file python 
Python :: command prompt pause in python 
Python :: Set column as index with pandas 
Python :: pandas search for nan in column 
Python :: tkinter entry read only 
Python :: how to import random module in python 
Python :: all alphabets 
Python :: how to subtract dates in python 
Python :: how to create data dictionary in python using keys and values 
Python :: panda datetime ymd to dmy 
Python :: emoji in python 
Python :: python check folder exist 
Python :: python turtle shooting game 
Python :: iterar una lista en python 
Python :: print() in python 
Python :: how to remove all zeros from a list in python 
Python :: remove empty strings from list python 
Python :: random list python 
Python :: python split sentence into words 
Python :: mongodb group by having 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =