Jea*_*rdi 8 python matplotlib pandas
我试图用它matplotlib来绘制直方图,但不断遇到此错误:
MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.
这是我的代码;也欢迎有关如何清理逻辑表达式的反馈。
lower_quartile = df['2020 Population'].quantile(0.25)
mid_quartile = df['2020 Population'].quantile(0.5)
upper_quartile = df['2020 Population'].quantile(0.75)
new_data = df.loc[df['2020 Population'] > lower_quartile]
final_2020_range = new_data.loc[df['2020 Population'] < upper_quartile]
check = final_2020_range['2020 Population']
plt.hist(check)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13823 次 |
| 最近记录: |