from sklearn feature_selection import chi path ' :\pima-indians-diabetes csvnames ['preg''plas''pres''skin''test''mass''pedi''age''class'dataframe read_csv(pathnames=namesarray dataframe values nextwe will separate array into input and output componentsx array[:, : array[:, the following lines of code will select the best features from datasettest selectkbest(score_func=chi = fit test fit( ,ywe can also summarize the data for output as per our choice herewe are setting the precision to and showing the data attributes with best features along with best score of each attributeset_printoptions(precision= print(fit scores_featured_data fit transform(xprint ("\nfeatured data:\ "featured_data[ : ]output featured data[[ [ ]