Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

fill misssing values using sklrean

import numpy as np
from sklearn.impute import SimpleImputer
imp = SimpleImputer(missing_values=np.nan, strategy='mean')
imp.fit([[1, 2], [np.nan, 3], [7, 6]])

X = [[np.nan, 2], [6, np.nan], [7, 6]]
print(imp.transform(X))
Comment

PREVIOUS NEXT
Code Example
Python :: problem with console writeline python 
Python :: get derivative of interp1d 
Python :: keepalive_requests 
Python :: !python read data from mysql and export to xecel 
Python :: extract all namespace from xml file python 
Python :: % python nootation 
Python :: django clear _pycache_ command 
Python :: collecting candies codevita solution in python 
Python :: jupyter lab extensions not working 
Python :: django user refistration 
Python :: ggt euklidischer algorithmus python 
Python :: number of features classification model jupyter notebook 
Python :: block url selenium python 
Python :: set destination of image in cv2.imwrite 
Python :: python how to hash string into pbkdf2 
Python :: multipart encoder 
Python :: what optimizer to simplernn 
Python :: initial TypedMultipleChoiceField django 
Python :: latch in rospy.publisher 
Python :: python convert a dict to list or a list to dict or a slice a dict or sort a dict by key or value without import 
Python :: pie chart eda syntax 
Python :: x = y < z and z y or y z and z < y python 
Python :: find and flag duplicates pandas 
Python :: flask gunicorn get ip 
Python :: if number Of Players == =4 python 
Python :: python save console state 
Python :: Python downsampling 
Python :: off-by-one error in python 
Python :: matplotlib radial averaging 
Python :: discord pycord add a URL button in a subclassed view 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =