text_html_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

youtube_df = pd.read_csv('/kaggle/input/youtube-new/USvideos.csv')

youtube_df.columns

youtube_df.shape[0]

youtube = youtube_df[['video_id', 'title', 'channel_title', 'category_id', 'views', 'likes', 'dislikes']]

avg_views = round(youtube['views'].mean())
avg_views

condition = youtube[youtube.views >= avg_views].shape[0]
round(condition / youtube.shape[0] * 100)

youtube['sentiment'] = round(youtube['dislikes'] / (youtube['likes'] + youtube['dislikes']) * 100)
avg_senti = youtube['sentiment'].mean()
avg_senti