Answers for "Assigning X and y using .iloc index"

0

Assigning X and y using .iloc index

X=data.iloc[:,[0,1,2,3,5,6]]#<class 'pandas.core.frame.DataFrame'>
y=data.iloc[:,4]#<class 'pandas.core.series.Series'> as y has only one column it is a series
Posted by: Guest on March-17-2022

Python Answers by Framework

Browse Popular Code Answers by Language