I have been following this Python linear regression tutorial: https://medium.com/@contactsunny/linear-regression-in-python-using-scikit-learn-f0f7b125a204
Using the following dataset: https://github.com/contactsunny/data-science-examples/blob/master/salaryData.csv
My problem is with the following piece of code:
x = dataset.iloc[:, :-1].values
What does the negation(-1) do here? Why do I get an error If I use the following as an alternate:
x = dataset.iloc[:, 0].values