0% found this document useful (0 votes)
2 views

data_set 1

The document contains a Jupyter notebook that processes a dataset of Korean TV shows using pandas. It includes operations such as reading the CSV file, displaying the first and last few rows, checking for null values, filling missing data, and dropping rows and columns with null values. Additionally, it provides descriptive statistics of the dataset, including counts, means, and standard deviations for various columns.

Uploaded by

madhumaran85
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

data_set 1

The document contains a Jupyter notebook that processes a dataset of Korean TV shows using pandas. It includes operations such as reading the CSV file, displaying the first and last few rows, checking for null values, filling missing data, and dropping rows and columns with null values. Additionally, it provides descriptive statistics of the dataset, including counts, means, and standard deviations for various columns.

Uploaded by

madhumaran85
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

04/03/2025, 10:57 Untitled1.

ipynb - Colab

import pandas as pd
data=pd.read_csv("/content/Data_set.csv")
data.head(7)

show_name country num_episodes aired_on original_network rating current_overall_rank lifetime_popularity_rank watch

South Friday,
0 NaN 16 tvN 8.9 33.0 1 1117
Korea Saturday

South Friday,
1 NaN 16 jTBC 8.7 89.0 2 1009
Korea Saturday

Descendants South Wednesday,


2 16 KBS2 8.7 77.0 3 963
of the Sun Korea Thursday

Boys Over South Monday,


3 25 KBS2 7.7 2249.0 4 942
Flowers Korea Tuesday

South Wednesday

data.isnull()

show_name country num_episodes aired_on original_network rating current_overall_rank lifetime_popularity_rank watche

0 True False False False False False False False Fa

1 True False False False False False False False Fa

2 False False False False False False False False Fa

3 False False False False False False False False Fa

4 False False False False False False False False Fa

... ... ... ... ... ... ... ... ...

95 False False False False False False False False Fa

96 False False False False False False False False Fa

97 False False False False False False False False Tr

98 False False False False False False False False Fa

99 False False False False False False False False Fa

100 rows × 9 columns

import pandas as pd
data=pd.read_csv("/content/Data_set.csv")
data.tail(7)

show_name country num_episodes aired_on original_network rating current_overall_rank lifetime_popularity_rank wa

Another Miss South Monday,


93 18 tvN 8.3 469.0 97
Oh Korea Tuesday

South Wednesday,
94 Flower of Evil 16 tvN 9.1 4.0 98
Korea Thursday

Shut Up:
South Monday,
95 Flower Boy 16 tvN 8.1 806.0 99
Korea Tuesday
Band

South Monday,
96 Blood 20 KBS2 7.4 3271.0 100
Korea Tuesday

data.fillna(5)

https://colab.research.google.com/drive/1lhSdzq0r7eRSQimzfU0Z7eMyemGLuemU#printMode=true 1/3
04/03/2025, 10:57 Untitled1.ipynb - Colab

show_name country num_episodes aired_on original_network rating current_overall_rank lifetime_popularity_rank wa

South Friday,
0 5 16 tvN 8.9 33.0 1 1
Korea Saturday

South Friday,
1 5 16 jTBC 8.7 89.0 2 1
Korea Saturday

Descendants South Wednesday,


2 16 KBS2 8.7 77.0 3
of the Sun Korea Thursday

Boys Over South Monday,


3 25 KBS2 7.7 2249.0 4
Flowers Korea Tuesday

South Wednesday,
4 W 16 MBC 8.5 201.0 5
Korea Thursday

... ... ... ... ... ... ... ... ...

Shut Up:
South Monday,
95 Flower Boy 16 tvN 8.1 806.0 99
Korea Tuesday
Band

South Monday,
96 Blood 20 KBS2 74 3271 0 100

data.dropna(axis=0)

show_name country num_episodes aired_on original_network rating current_overall_rank lifetime_popularity_rank wa

Descendants South Wednesday,


2 16 KBS2 8.7 77.0 3
of the Sun Korea Thursday

Boys Over South Monday,


3 25 KBS2 7.7 2249.0 4
Flowers Korea Tuesday

South Wednesday,
4 W 16 MBC 8.5 201.0 5
Korea Thursday

You Who Came South Wednesday,


5 21 SBS 8.6 112.0 6
from the Stars Korea Thursday

Weightlifting
South Wednesday,
6 Fairy Kim Bok 16 MBC 8.8 40.0 7
Korea Thursday
Joo

... ... ... ... ... ... ... ... ...

South Wednesday,
94 Flower of Evil 16 tvN 9.1 4.0 98
Korea Thursday

Shut Up:
South Monday

data.dropna(axis=1)

country num_episodes lifetime_popularity_rank

0 South Korea 16 1

1 South Korea 16 2

2 South Korea 16 3

3 South Korea 25 4

4 South Korea 16 5

... ... ... ...

95 South Korea 16 99

96 South Korea 20 100

97 South Korea 16 101

98 South Korea 20 102

99 South Korea 16 103

100 rows × 3 columns

data.shape

(100, 9)

data.info()

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 100 entries, 0 to 99
Data columns (total 9 columns):
https://colab.research.google.com/drive/1lhSdzq0r7eRSQimzfU0Z7eMyemGLuemU#printMode=true 2/3
04/03/2025, 10:57 Untitled1.ipynb - Colab
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 show_name 96 non-null object
1 country 100 non-null object
2 num_episodes 100 non-null int64
3 aired_on 99 non-null object
4 original_network 99 non-null object
5 rating 96 non-null float64
6 current_overall_rank 97 non-null float64
7 lifetime_popularity_rank 100 non-null int64
8 watchers 97 non-null float64
dtypes: float64(3), int64(2), object(4)
memory usage: 7.2+ KB

data.describe()

num_episodes rating current_overall_rank lifetime_popularity_rank watchers

count 100.000000 96.000000 97.000000 100.000000 97.000000

mean 18.980000 8.293750 731.247423 51.650000 52994.907216

std 6.846041 0.424714 857.597007 30.133164 17551.028458

min 8.000000 7.300000 2.000000 1.000000 34523.000000

25% 16.000000 8.100000 194.000000 25.750000 39545.000000

50% 16.000000 8.300000 441.000000 51.500000 46963.000000

75% 20.000000 8.600000 806.000000 77.250000 63140.000000

max 50.000000 9.100000 3788.000000 103.000000 111706.000000

https://colab.research.google.com/drive/1lhSdzq0r7eRSQimzfU0Z7eMyemGLuemU#printMode=true 3/3

You might also like