Kaggle Challenge 08 - Working with External Libraries

JongseokLee·2021년 8월 10일
0
post-thumbnail

Kaggle Challenge 08 - Working with External Libraries

Tutorial

import pandas as pd

# save filepath to variable for easier access
melbourne_file_path = '../input/melbourne-housing-snapshot/melb_data.csv'
# read the data and store data in DataFrame titled melbourne_data
melbourne_data = pd.read_csv(melbourne_file_path) 
# print a summary of the data in Melbourne data
melbourne_data.describe()

Step 1: Loading Data

Quesition

import pandas as pd

# Path of the file to read
iowa_file_path = '../input/home-data-for-ml-course/train.csv'

# Fill in the line below to read the file into a variable home_data
home_data = ____

# Call line below with no argument to check that you've loaded the data correctly
step_1.check()

Solution

home_data = pd.read_csv(iowa_file_path)

Step 2: Review The Data

Quesition

# What is the average lot size (rounded to nearest integer)?
avg_lot_size = ____

# As of today, how old is the newest home (current year - the date in which it was built)
newest_home_age = ____

# Checks your answers
step_2.check()
Solution:

# using data read from home_data.describe()
avg_lot_size = 10517
newest_home_age = 11

Vocabularies

speculate[VN] 투기하다.

profile
DataEngineer Lee.

0개의 댓글