← 返回题库
初级

College数据集直方图

未完成
初级参考 完整示例代码供参考,建议自己理解后重新输入
import pandas as pd
import matplotlib.pyplot as plt
college = pd.read_csv('https://liangdaima.com/static/data/statistics/College.csv')
plt.figure(figsize=(10, 6))
plt.hist(college['Top10perc'], bins=50, edgecolor='black')
plt.xlabel('Top10perc')
plt.ylabel('Frequency')
plt.title('Top10perc分布直方图')
plt.show()
Python 代码 🔒 登录后使用
🔒

登录后即可练习

注册免费账号,在浏览器中直接运行 Python 代码