So I am having extreme trouble with an assignment I am working on, and I was hoping to get some help.
I was told to download a file named Position_Salaries.csv (and I included a screenshot of the file's contents below).
I am told to:
- Read the file in Python Jupyter Notebook.
- Visualize the data; create a scatterplot to understand the data.
- Create a feature and target.
- Fit the data to create a linear regression model where the target is 'Salary' and the feature is 'Level'.
Can someone help me out with the Python 3 code needed to accomplish this? I thank you so much for your help, I am about to graduate and Chegg has been the best thing that has ever happened to me.
EXTREME BONUS QUESTION:
- Create a plot showing the linear regression line along with the scatterplot data.
- Predict the salary of a corporate employee whose level is 8.
BLESS YOU
A B c Level Salary
1 25000
2 30000
2 38000
3 42000
3 44000
4 46000
4 45000
5 50000
6 60000
7 70000
8 80000
6 90000
10 110000
11 150000
12 200000
13 300000
6 75000
6 68000
1 22000
8 95000
11 120000
2 20000
14 480000
14 500000
15 1000000
15 1100000
15 900000
15 1300000
Position
Business Trainee
3 Business Intern
4 Business Intern
5 Junior Business Analyst
6 Junior Business Analyst
7 Business Analyst
Business Analyst
Junior Consultant
10 Senior Consultant
11 Deputy Manager
12 Manager
13 Senior Manager
14 Country Manager
15 Region Manager
16 Partner
17 Senior Partner
18 Senior Consultant
19 Senior Consultant
20 Business Trainee
21 Manager
22 Region Manager
23 Business Intern
24 C-level
25 C-level
26 CEO
27 CEO
28 CEO
29 CEO
30 31