Importing a Dataset in Python
CSS 300 Module 1 Lab Activity Worksheet
Use this worksheet to complete your lab activity. Submit it to the applicable assignment
submission folder when complete.
Deliverable:
– Answers to the questions in Part 1
– An image of the results from Part 2
Part 1 – Getting to Know a Dataset
Download the US Weather Events dataset. You can find out more about this dataset at Kaggle’s
US Weather Events (2016-2019).
Answer these questions to understand the US Weather Events dataset:
1. Where did the data come from? Is it static, or will it be updated on a consistent basis?
Is it reliable?
2. Check the dimensions of the table. How many columns are there? How many rows?
3. What are the data types of each column? Are they continuous/numeric? Are they
integer? Are they categorical?
Part 2 – Importing a Dataset in Python
If you need Python follow this link:
1. Import the Pandas package using the Anaconda install option:
https://docs.continuum.io/anaconda/
2. Launch the Anaconda Application on your computer
3. Launch the Jupyter Application within Anaconda
4. Navigate to the folder with the dataset and run a New Python 3 Terminal within Jupyter
5. Import dataset from Part 1 by using the following code:
import pandas as pd
df = pd.read_csv(“US_WeatherEvents_2016-2019.csv”)
6. Print the data to the screen by using the following code:
df.head()
7. Print more information for the dataset by using the following code:
df.info()