Explore train data
You will work with another Kaggle competition called "Store Item Demand Forecasting Challenge". In this competition, you are given 5 years of store-item sales data, and asked to predict 3 months of sales for 50 different items in 10 different stores.
To begin, let's explore the train data for this competition. For the faster performance, you will work with a subset of the train data containing only a single month history.
Your initial goal is to read the input data and take the first look at it.
This exercise is part of the course
Winning a Kaggle Competition in Python
Exercise instructions
- Import
pandas
aspd
. - Read train data using
pandas
'read_csv()
method. - Print the head of the train data (using
head()
method) to see the data sample.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Import pandas
import ____ as pd
# Read train data
train = pd.____('train.csv')
# Look at the shape of the data
print('Train shape:', train.shape)
# Look at the head() of the data
print(train.____())