machine learning with python preparing data introduction machine learning algorithms are completely dependent on data because it is the most crucial aspect that makes model training possible on the other handif we won' be able to make sense out of that databefore feeding it to ml algorithmsa machine will be useless in simple wordswe always need to feed right data the data in correct scaleformat and containing meaningful featuresfor the problem we want machine to solve this makes data preparation the most important step in ml process data preparation may be defined as the procedure that makes our dataset more appropriate for ml process why data pre-processingafter selecting the raw data for ml trainingthe most important task is data preprocessing in broad sensedata preprocessing will convert the selected data into form we can work with or can feed to ml algorithms we always need to preprocess our data so that it can be as per the expectation of machine learning algorithm data pre-processing techniques we have the following data preprocessing techniques that can be applied on data set to produce data for ml algorithmsscalingmost probably our dataset comprises of the attributes with varying scalebut we cannot provide such data to ml algorithm hence it requires rescaling data rescaling makes sure that attributes are at same scale generallyattributes are rescaled into the range of and ml algorithms like gradient descent and -nearest neighbors requires scaled data we can rescale the data with the help of minmaxscaler class of scikit-learn python library example in this example we will rescale the data of pima indians diabetes dataset which we used earlier firstthe csv data will be loaded (as done in the previous and then with the help of minmaxscaler classit will be rescaled in the range of and the first few lines of the following script are same as we have written in previous while loading csv data from pandas import read_csv from numpy import set_printoptions from sklearn import preprocessing path ' :\pima-indians-diabetes csv