Skip to content

Instantly share code, notes, and snippets.

@grohith327
Created June 13, 2018 16:21
Show Gist options
  • Save grohith327/11585288532478136781ebccf0b143b0 to your computer and use it in GitHub Desktop.
Save grohith327/11585288532478136781ebccf0b143b0 to your computer and use it in GitHub Desktop.
import pandas as pd
## Load Iris dataset
df = pd.read_csv('/Users/rohith/Documents/Datasets/Iris_dataset/Iris.csv')
## Retrieve the target values and drop the Id along with it
target = df['Species']
df = df.drop(['Species','Id'],axis=1)
## Drop the two features we won't be using from the dataframe
df = df.drop(['SepalWidthCm','PetalWidthCm'],axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment