Python Machine Learning Data Pre-Processing Template
From Federal Burro of Information
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('filename.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values from sklearn.model_selection import train_test_split X_train, X_test , y_train, y_test = train_test_split(X,y,test_size = 0.2 , random_state = 81 )
source: Udemey "Machine Learning A-Z™: Python & R in Data Science [2023]"