Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

splitting Feature and target using iloc

# splitting features and the target variable
# consider all the columns except 'h1n1_vaccine' using 'iloc'
df_features = df_vaccine.iloc[:, df_vaccine.columns != 'h1n1_vaccine']

# consider the target variable
df_target = df_vaccine.iloc[:, df_vaccine.columns == 'h1n1_vaccine']
Source by colab.research.google.com #
 
PREVIOUS NEXT
Tagged: #splitting #Feature #target #iloc
ADD COMMENT
Topic
Name
6+4 =