首页 > 其他 > 详细

Kaggle_Data Bar Charts and Heatmaps

时间:2020-05-12 21:30:08      阅读:54      评论:0      收藏:0      [点我收藏+]

step0 activate bar charts and heatmaps

载入库文件

import pandas as pd
pd.plotting.register_matplotlib_converters()
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
print("Setup Complete")

设置代码检测

# Set up code checking
import os
if not os.path.exists("../input/ign_scores.csv"):
    os.symlink("../input/data-for-datavis/ign_scores.csv", "../input/ign_scores.csv") 
from learntools.core import binder
binder.bind(globals())
from learntools.data_viz_to_coder.ex3 import *
print("Setup Complete")

载入数据

ign_filepath="../inputs/ign_scores.csv"
ign_data=pd.read_csv(ign_filepath,index_col="Platform",parse_dates=True)
step_1.check()

step2 review the data

print the data

print(ign_data) # Your code here

技术分享图片

技术分享图片

 

取出数据,做测验并check

# Fill in the line below: What is the highest average score received by PC games,
# for any platform?
high_score = 7.759930

# Fill in the line below: On the Playstation Vita platform, which genre has the 
# lowest average score? Please provide the name of the column, and put your answer 
# in single quotes (e.g., ‘Action‘, ‘Adventure‘, ‘Fighting‘, etc.)
worst_genre = Simulation

# Check your answers
step_2.check()

step3 pick up the best platform

create a bar chart

 

Kaggle_Data Bar Charts and Heatmaps

原文:https://www.cnblogs.com/yuyukun/p/12878291.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!