0% found this document useful (0 votes)
9 views5 pages

Tugas Besar

The document analyzes employee performance data from a CSV file with 96 employees. It imports the data into a Pandas dataframe and prints the dataframe, which contains columns for employee ID, working hours, sales made, and customer rating.

Uploaded by

Rendy Nova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Tugas Besar

The document analyzes employee performance data from a CSV file with 96 employees. It imports the data into a Pandas dataframe and prints the dataframe, which contains columns for employee ID, working hours, sales made, and customer rating.

Uploaded by

Rendy Nova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

12/26/23, 6:58 PM Tugas Besar

Kelompok 1

Employee_Performance
Hammam Rizqullah Maulana (23522236)

Rendy Nauval Setiawan (23522223)

Rif'at Fayyazhuda Putra (23522212)


In [1]: import pandas as pd

df = pd.read_csv("employee_performance.csv")

print(df.to_string())

# Tip: use to_string () to print the entire Data

localhost:8888/nbconvert/html/Logika Pemrograman/Numpy Download/Tugas Besar/Tugas Besar.ipynb?download=false 1/5


12/26/23, 6:58 PM Tugas Besar
employee_id working_hours sales_made customer_rating
0 1 21.0 40.0 2,62
1 2 NaN 22.0 2,6
2 3 32.0 30.0 3,69
3 4 32.0 19.0 2,38
4 5 41.0 4.0 3,86
5 6 38.0 NaN 3,56
6 7 45.0 42.0 NaN
7 8 33.0 10.0 2,73
8 9 50.0 NaN 3,46
9 10 48.0 22.0 NaN
10 11 41.0 37.0 4,29
11 12 26.0 NaN 3,61
12 13 NaN 41.0 NaN
13 14 NaN 40.0 3,15
14 15 46.0 17.0 1,44
15 16 50.0 40.0 2,62
16 17 25.0 42.0 2,62
17 18 35.0 30.0 NaN
18 19 NaN NaN 1,12
19 20 57.0 33.0 3,95
20 21 51.0 NaN NaN
21 22 52.0 46.0 3,43
22 23 36.0 NaN 3,81
23 24 52.0 24.0 3,54
24 25 NaN 16.0 4,84
25 26 NaN NaN 1,41
26 27 49.0 39.0 NaN
27 28 20.0 29.0 1,12
28 29 49.0 1.0 3,14
29 30 46.0 23.0 NaN
30 31 59.0 8.0 3,1
31 32 NaN 0.0 2,46
32 33 39.0 23.0 1,76
33 34 NaN 37.0 1,08
34 35 56.0 47.0 3,07
35 36 NaN 26.0 4,37
36 37 56.0 25.0 2,49
37 38 25.0 25.0 1,89
38 39 48.0 6.0 1,32
39 40 32.0 24.0 1,34
40 41 46.0 15.0 1,89
41 42 39.0 37.0 1,4
42 43 32.0 41.0 2,06
43 44 58.0 17.0 1,26
44 45 27.0 16.0 1,26
45 46 36.0 48.0 4,43
46 47 NaN 43.0 1,65
47 48 20.0 46.0 3,24
48 49 43.0 5.0 4,09
49 50 35.0 19.0 2,83
50 51 30.0 47.0 1,61
51 52 23.0 22.0 1,8
52 53 23.0 NaN 2,73
53 54 36.0 11.0 3,11
54 55 NaN 11.0 NaN
55 56 40.0 33.0 4,13
56 57 57.0 7.0 4
57 58 37.0 26.0 4,71
58 59 29.0 NaN 1,12
59 60 35.0 7.0 4,58
60 61 NaN 47.0 2,57
61 62 34.0 32.0 NaN
62 63 53.0 NaN 3,76

localhost:8888/nbconvert/html/Logika Pemrograman/Numpy Download/Tugas Besar/Tugas Besar.ipynb?download=false 2/5


12/26/23, 6:58 PM Tugas Besar
63 64 24.0 18.0 4,95
64 65 36.0 23.0 4,04
65 66 56.0 NaN 2,46
66 67 27.0 2.0 3
67 68 43.0 8.0 2,51
68 69 47.0 10.0 2,46
69 70 27.0 5.0 NaN
70 71 42.0 38.0 2,98
71 72 NaN 38.0 3,73
72 73 50.0 NaN 2,11
73 74 36.0 NaN 3,1
74 75 47.0 36.0 1,47
75 76 31.0 NaN 1,64
76 77 43.0 5.0 1,19
77 78 34.0 38.0 4,88
78 79 59.0 35.0 1,02
79 80 50.0 24.0 NaN
80 81 46.0 49.0 3,45
81 82 NaN 15.0 1,33
82 83 37.0 20.0 4,53
83 84 55.0 NaN 3,88
84 85 27.0 4.0 4,87
85 86 57.0 49.0 3,03
86 87 24.0 24.0 2,2
87 88 33.0 30.0 3,2
88 89 57.0 2.0 NaN
89 90 39.0 19.0 NaN
90 91 28.0 3.0 2,07
91 92 52.0 13.0 4,51
92 93 NaN 11.0 2,49
93 94 25.0 13.0 1,01
94 95 56.0 36.0 1,99
95 96 21.0 17.0 2,27
96 97 49.0 26.0 4,44
97 98 25.0 6.0 NaN
98 99 36.0 47.0 2,78
99 100 58.0 34.0 NaN

Cleaning Empty Cels


In [4]: import pandas as pd

df = pd.read_csv(('employee_performance.csv'))

new_df = df.dropna()

print(new_df.to_string)

localhost:8888/nbconvert/html/Logika Pemrograman/Numpy Download/Tugas Besar/Tugas Besar.ipynb?download=false 3/5


12/26/23, 6:58 PM Tugas Besar
<bound method DataFrame.to_string of employee_id working_hours sales_made cu
stomer_rating
0 1 21.0 40.0 2,62
2 3 32.0 30.0 3,69
3 4 32.0 19.0 2,38
4 5 41.0 4.0 3,86
7 8 33.0 10.0 2,73
10 11 41.0 37.0 4,29
14 15 46.0 17.0 1,44
15 16 50.0 40.0 2,62
16 17 25.0 42.0 2,62
19 20 57.0 33.0 3,95
21 22 52.0 46.0 3,43
23 24 52.0 24.0 3,54
27 28 20.0 29.0 1,12
28 29 49.0 1.0 3,14
30 31 59.0 8.0 3,1
32 33 39.0 23.0 1,76
34 35 56.0 47.0 3,07
36 37 56.0 25.0 2,49
37 38 25.0 25.0 1,89
38 39 48.0 6.0 1,32
39 40 32.0 24.0 1,34
40 41 46.0 15.0 1,89
41 42 39.0 37.0 1,4
42 43 32.0 41.0 2,06
43 44 58.0 17.0 1,26
44 45 27.0 16.0 1,26
45 46 36.0 48.0 4,43
47 48 20.0 46.0 3,24
48 49 43.0 5.0 4,09
49 50 35.0 19.0 2,83
50 51 30.0 47.0 1,61
51 52 23.0 22.0 1,8
53 54 36.0 11.0 3,11
55 56 40.0 33.0 4,13
56 57 57.0 7.0 4
57 58 37.0 26.0 4,71
59 60 35.0 7.0 4,58
63 64 24.0 18.0 4,95
64 65 36.0 23.0 4,04
66 67 27.0 2.0 3
67 68 43.0 8.0 2,51
68 69 47.0 10.0 2,46
70 71 42.0 38.0 2,98
74 75 47.0 36.0 1,47
76 77 43.0 5.0 1,19
77 78 34.0 38.0 4,88
78 79 59.0 35.0 1,02
80 81 46.0 49.0 3,45
82 83 37.0 20.0 4,53
84 85 27.0 4.0 4,87
85 86 57.0 49.0 3,03
86 87 24.0 24.0 2,2
87 88 33.0 30.0 3,2
90 91 28.0 3.0 2,07
91 92 52.0 13.0 4,51
93 94 25.0 13.0 1,01
94 95 56.0 36.0 1,99
95 96 21.0 17.0 2,27
96 97 49.0 26.0 4,44
98 99 36.0 47.0 2,78>

localhost:8888/nbconvert/html/Logika Pemrograman/Numpy Download/Tugas Besar/Tugas Besar.ipynb?download=false 4/5


12/26/23, 6:58 PM Tugas Besar

Menampilkan 5 Data Teratas & 5 Data Terbawah


In [1]: import pandas as pd
df = pd.read_csv('employee_performance.csv')
print (df)

employee_id working_hours sales_made customer_rating


0 1 21.0 40.0 2,62
1 2 NaN 22.0 2,6
2 3 32.0 30.0 3,69
3 4 32.0 19.0 2,38
4 5 41.0 4.0 3,86
.. ... ... ... ...
95 96 21.0 17.0 2,27
96 97 49.0 26.0 4,44
97 98 25.0 6.0 NaN
98 99 36.0 47.0 2,78
99 100 58.0 34.0 NaN

[100 rows x 4 columns]

Line Plot
In [1]: import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('employee_performance.csv')

df.plot()
plt.plot()

[]
Out[1]:

localhost:8888/nbconvert/html/Logika Pemrograman/Numpy Download/Tugas Besar/Tugas Besar.ipynb?download=false 5/5

You might also like