Show Menu
Cheatography

Scikit-python L1 Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Read a file with pandas

import pandas as pd 

data = pd.read_csv('path_to_file' , delimiter= 'delim_char')

Some statistics

data['col_name'].mean() #Calcul de la moyenne

data['col_name'] = Série pandas
data[['col_name']] = une data Frame

-------------------------------------------------
from sklearn import preprocessing

data[['col_name']] = preprocessing.scale(data[['col_name']]) #Divise par écart type aprés avoir soustrait par la moyenne de la colonne