Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

check if dataframe contains infinity

df.replace([np.inf, -np.inf], np.nan).dropna(subset=["col1", "col2"], how="all")
Comment

PREVIOUS NEXT
Code Example
Python :: Return a Series containing counts of unique values. 
Python :: how to catch ctrl c in python 
Python :: python recursive sum of digit 
Python :: install python 3.6 on centos 
Python :: strings are immutable in python 
Python :: python writelines 
Python :: instabot login python 
Python :: Read text file line by line using the readline() function 
Python :: how to use the random module in python 
Python :: how to fetch all chars of a string before a space in python 
Python :: django secure secret key 
Python :: keras linear regression 
Python :: python pillow resize image 
Python :: where to find location of where python is installed linux 
Python :: wget command python 
Python :: make entry bigger in tkinter python 
Python :: how to delete a column from a dataframe in python 
Python :: import gensim 
Python :: get dictionary elements by index in python 
Python :: how to add two numbers in python 
Python :: convert array to set python 
Python :: tf-idf python implementation 
Python :: how to create string in python 
Python :: pickle.dump python 
Python :: python merge dictionaries 
Python :: groupby count pandas 
Python :: how to press enter in selenium python 
Python :: remove punctuation python 
Python :: convert dictionary keys/values to lowercase in python 
Python :: matplotlib location legend 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =