说明
这个top250系列(二)爬取到了很多信息,接下来简单分析一下
小声bb——比较忙,没什么文字,来不及陈述分析过程及结论(哭)
首先引入必要的库
import warnings
from pandas_profiling import ProfileReport
from collections import Counter
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_style("darkgrid")
warnings.filterwarnings("ignore")
%matplotlib inline
看看年份的信息,榜上有名最早的电影追溯到1931年了,最晚的是2019
看看评分的分布,集中在8.8左右
sns.scatterplot(data=rating)
看看评论数
plt.figure(figsize=(18, 10))
sns.lineplot(x='rank',y='rating',data=df)
看看排名和评分,以及评论数的关系
plt.figure(figsize=(10, 8))
sns.heatmap(df[['rank','rating','countNum']].corr(), annot=True)
plt.show()