Answers for "dataframe iloc column name"

8

iloc in dataframe

df=pd.read_csv('yourcsv.csv')
X=df.iloc[:,:-1].values
y=df.iloc[:,1].values
Posted by: Guest on June-15-2020
0

pandas iloc include header

new_header = df.iloc[0] 
df = df[1:] 
df.columns = new_header
Posted by: Guest on March-08-2021

Python Answers by Framework

Browse Popular Code Answers by Language