You are on page 1of 1

In [1]: import numpy as np

import pandas as pd

In [2]: df = pd.read_excel('student marks odisha.xlsx')


df

Out[2]: Name Semester Mark

0 BIKASH 1st 40

1 SWARAJ 1st 41

2 TRISHNA 1st 37

3 SARBAJAY 1st 38

4 ABHISHEK 1st 30

5 DEBIPRASAD 1st 41

6 PADMA 1st 46

7 BIKASH 2nd 40

8 SWARAJ 2nd 45

9 TRISHNA 2nd 34

10 SARBAJAY 2nd 34

11 ABHISHEK 2nd 43

12 DEBIPRASAD 2nd 33

13 PADMA 2nd 34

14 BIKASH 3rd 45

15 SWARAJ 3rd 33

16 TRISHNA 3rd 43

17 SARBAJAY 3rd 42

18 ABHISHEK 3rd 24

19 DEBIPRASAD 3rd 34

20 PADMA 3rd 33

21 BIKASH 4th 46

22 SWARAJ 4th 36

23 TRISHNA 4th 38

24 SARBAJAY 4th 27

25 ABHISHEK 4th 35

26 DEBIPRASAD 4th 45

27 PADMA 4th 36

28 BIKASH 5th 37

29 SWARAJ 5th 33

30 TRISHNA 5th 35

31 SARBAJAY 5th 45

32 ABHISHEK 5th 46

33 DEBIPRASAD 5th 44

34 PADMA 5th 36

35 BIKASH 6th 46

36 SWARAJ 6th 44

37 TRISHNA 6th 45

38 SARBAJAY 6th 35

39 ABHISHEK 6th 36

40 DEBIPRASAD 6th 39

41 PADMA 6th 38

42 BIKASH 7th 44

43 SWARAJ 7th 45

44 TRISHNA 7th 44

45 SARBAJAY 7th 42

46 ABHISHEK 7th 40

47 DEBIPRASAD 7th 44

48 PADMA 7th 43

In [3]: df.head()

Out[3]: Name Semester Mark

0 BIKASH 1st 40

1 SWARAJ 1st 41

2 TRISHNA 1st 37

3 SARBAJAY 1st 38

4 ABHISHEK 1st 30

In [4]: df.tail()

Out[4]: Name Semester Mark

44 TRISHNA 7th 44

45 SARBAJAY 7th 42

46 ABHISHEK 7th 40

47 DEBIPRASAD 7th 44

48 PADMA 7th 43

In [6]: df.mean()

C:\Users\rupes\AppData\Local\Temp\ipykernel_9084\3698961737.py:1: FutureWarning: The default value of numeric_only in DataFrame.mean is deprecated.


In a future version, it will default to False. In addition, specifying 'numeric_only=None' is deprecated. Select only valid columns or specify the
value of numeric_only to silence this warning.
df.mean()
Mark 39.061224
Out[6]:
dtype: float64

In [7]: df.median()

C:\Users\rupes\AppData\Local\Temp\ipykernel_9084\530051474.py:1: FutureWarning: The default value of numeric_only in DataFrame.median is deprecate


d. In a future version, it will default to False. In addition, specifying 'numeric_only=None' is deprecated. Select only valid columns or specify t
he value of numeric_only to silence this warning.
df.median()
Mark 40.0
Out[7]:
dtype: float64

In [9]: df.mode()

Out[9]: Name Semester Mark

0 ABHISHEK 1st 45.0

1 BIKASH 2nd NaN

2 DEBIPRASAD 3rd NaN

3 PADMA 4th NaN

4 SARBAJAY 5th NaN

5 SWARAJ 6th NaN

6 TRISHNA 7th NaN

In [13]: df.describe()

Out[13]: Mark

count 49.000000

mean 39.061224

std 5.406047

min 24.000000

25% 35.000000

50% 40.000000

75% 44.000000

max 46.000000

In [ ]:

You might also like