application_vnd.jupyter.stderr_output_1.png image_output_1.png
import matplotlib.pyplot as plt

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

import seaborn as sns

df = pd.read_csv('/kaggle/input/top-10000-popular-movies-tmdb-05-2023/popular_10000_movies_tmdb.csv')
df

top_5_popular_movies = df[['title', 'popularity']]

most_popularity_lng = df.groupby('original_language')['popularity'].mean()
most_popularity_lng

top_10_selling_movie = df[["title","revenue"]]
top_10_selling_movie = top_10_selling_movie.sort_values(["revenue"],ascending=False)
top_10_selling_movie=top_10_selling_movie.head(10)

top_5_popular_movies=top_5_popular_movies.head(5)
plt.figure()
sns.barplot(x='popularity', y='title', data = top_5_popular_movies, palette='viridis')
plt.title('top 5 popular movie')
plt.xlabel('popularity')
plt.ylabel('title')
plt.show()

df_2 = pd.read_csv('/kaggle/input/anime-recommendations-database/anime.csv')
df_2

Top_10_anime_members = df_2[['name', 'members']]
Top_10_anime_members = Top_10_anime_members.sort_values(['members'], ascending=False)

Top_10_anime_members=Top_10_anime_members.head(10)
plt.figure()
sns.barplot(x='members', y='name', data=Top_10_anime_members, palette='viridis')
plt.title('top 10 anime members')
plt.xlabel('members')
plt.ylabel('name')
plt.show()

top_10_anime_rating = df_2[['name', 'rating']]
top_10_anime_rating = top_10_anime_rating.sort_values(['rating'], ascending=False)

df2_20 = df_2.head(20)
plt.figure(figsize=(20, 10))
sns.lineplot(x='members', y='rating',data=df2_20, color='red')
# plt.title('the relation between episodes and name')
plt.xlabel('members')
plt.ylabel('rating')

top_5_anime_episodes = df_2[['name', 'episodes']]
top_5_anime_episodes.head(10)