You are on page 1of 1

DS100-3

Worksheet 2.4
APPLIED DATA SCIENCE
IMPORTING DATA IN PYTHON

Name:

Page 1 of 1

Write codes in Jupyter notebook as required by the problems. Copy both code and output as screen grab or screen shot and paste
them here.

1 Use NumPy to import wikipedia-vocabulary.txt. Print the first 5 lines.


Code and Output

2 Import gold.csv. Use the country name abbreviations as row index. Print the first three lines of the dataset.
Code and Output

3 Import ebola.csv. Use the Date column as datetime index. Print the first 2 lines of the dataframe.
Code and Output

4 Import the data on the 2004 sheet of the file battledeath.xlsx using pandas. Assign the data to a dataframe named
data. Print the first 5 lines of the dataframe.
Code and Output

5 Import red wine data from the following url:

'https://s3.amazonaws.com/assets.datacamp.com/production/course_1606/
datasets/winequality-red.csv'

Save the data to a csv file named red_wine.csv. Import this data to the Python environment and assign the data to a
dataframe named data_5. Print the first five lines of this dataframe.

Code and Output

Page 1 of 1

You might also like