<jupyter_start><jupyter_text>![Image](https://dailyanimeart.files.wordpress.com/2015/04/lots-of-popular-anime-characters1.png) Insert Anime Name<jupyter_code>anime_name='Death Note'<jupyter_output><empty_output><jupyter_text>Importing Libraries<jupyter_code>import numpy as np
import warnings
import os
import pandas as pd 
warnings.filterwarnings('ignore')<jupyter_output><empty_output><jupyter_text>Reading Dataset<jupyter_code>anime = pd.read_csv('../input/anime-recommendations-database/anime.csv')
anime_rating = pd.read_csv('../input/anime-recommendations-database/rating.csv')<jupyter_output><empty_output><jupyter_text>Cleaning Data<jupyter_code>ratings = pd.DataFrame(anime_rating.groupby('anime_id')['rating'].mean())
ratings['num of ratings'] = pd.DataFrame(
    anime_rating.groupby('anime_id')['rating'].count())
# anime_rating.drop(['genre', 'type', 'episodes'],
#                   axis=1, inplace=True)
anime2 = anime_rating.pivot_table(
    index='user_id', columns='anime_id', values='rating')
anime2.fillna(0, inplace=True)

anime_ids= anime[anime['name']==anime_name]
anime_id=anime_ids['anime_id']
anime_user_ratings = anime2[int(anime_id)]<jupyter_output><empty_output><jupyter_text>Pairwise Correlation<jupyter_code>similar_anime = anime2.corrwith(anime_user_ratings, method='pearson')
corr_anime = pd.DataFrame(similar_anime, columns=['Correlation'])<jupyter_output><empty_output><jupyter_text>Print Output<jupyter_code>x = corr_anime.sort_values('Correlation', ascending=False).index
anime_names= anime[anime['anime_id']==x[1]]
anime_y=anime_names['name']
print(str(anime_y))<jupyter_output>19    Code Geass: Hangyaku no Lelouch
Name: name, dtype: object
{'fraction_non_alphanumeric': 0.14770696843359143, 'fraction_numerical': 0.009529481834425254, 'mean_word_length': 9.838709677419354, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '65088', 'license': 'MIT', 'n_tokens_mistral': 656, 'n_tokens_neox': 634, 'n_words': 68, 'path': 'anime-recommend-notebook.ipynb', 'repo_name': 'tanav2202/100-days-python-and-Ml', 'size': '1679'}