首页 > 其他 > 详细

Kaggle_Data Visulazation of line charts

时间:2020-05-11 21:31:14      阅读:62      评论:0      收藏:0      [点我收藏+]

step0 setup

set up pyhton libraries

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

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

step1 load the data

# Path of the file to read
spotify_filepath = "../input/spotify.csv"

# Read the file into a variable spotify_data
spotify_data = pd.read_csv(spotify_filepath, index_col="Date", parse_dates=True)
# Path of the file to read
museum_filepath = "../input/museum_visitors.csv"

# Fill in the line below to read the file into a variable museum_data
museum_data = pd.read_csv(museum_filepath, index_col="Date", parse_dates=True)

# Run the line below with no changes to check that you‘ve loaded the data correctly
step_1.check()

step2 review the data

# Path of the file to readmuseum_filepath = "../input/museum_visitors.csv"
# Fill in the line below to read the file into a variable museum_datamuseum_data = pd.read_csv(museum_filepath, index_col="Date", parse_dates=True)
# Run the line below with no changes to check that you‘ve loaded the data correctlystep_1.check()

打印最后5行数据

 

Kaggle_Data Visulazation of line charts

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

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