llSourcell / linear_regression_live

This is the code for the "How to Do Linear Regression the Right Way" live session by Siraj Raval on Youtube
MIT License
283 stars 443 forks source link

csv file doesnt have proper column name #13

Open FrankenDeba opened 6 years ago

FrankenDeba commented 6 years ago

from pandas import * df=read_csv("data.csv") df.rename(columns={"32.502345269453031":"amount of hour studied"},inplace=True) df.rename(columns={"31.70700584656992":"test scores"},inplace=True)

uddeshyatyagi commented 4 years ago

Hi @FrankenDeba, u can not directly change name like that,you are converting the 1st row values to name and that may affects the results.