Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Replace the string with NAN value

data['horsepower'].replace(to_replace='?' , value = np.nan,inplace = True)
data['horsepower'].unique()
Comment

replace nan

df['salary'] = df['salary'].fillna(df['salary'].mode()[0])
Comment

PREVIOUS NEXT
Code Example
Python :: python tutorial pdf 
Python :: python compare each item of one list 
Python :: pandas create average per group 
Python :: make value of two tables unique django 
Python :: python single line function 
Python :: ubuntu python3 as python 
Python :: python list index() 
Python :: python get class from string 
Python :: python remove dtype from array 
Python :: install python macos catalina 
Python :: how to print in python 
Python :: python empty dataframe 
Python :: pytube get highest resolution 
Python :: mysql store numpy array 
Python :: matrix rotation in python 
Python :: while python 
Python :: python tableau 2d 
Python :: move files in python 
Python :: import matplotlib pyplot as plt 
Python :: newline in python gives an extra one 
Python :: empty array python 
Python :: python search in json file 
Python :: radix sort strings python 
Python :: decision tree python 
Python :: django exclude queryset 
Python :: django.db.utils.IntegrityError: 
Python :: Create list of unique values from dictionary 
Python :: get lastest files from directory python 
Python :: groupby fillna 
Python :: NumPy flip Syntax 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =