Skip to content
Intermediate Importing Data in Python
Run the hidden code cell below to import the data used in this course.
# Importing the course packages
import json
import pandas as pd
# Read the Twitter data
tweets_data = []
tweets_file = open("datasets/tweets.txt", "r")
for line in tweets_file:
tweet = json.loads(line)
tweets_data.append(tweet)
tweets_file.close()
# Import the other two datasets
wine = pd.read_csv("datasets/winequality-red.csv", sep=";")
latitude = pd.read_excel("datasets/latitude.xls")
Take Notes
Add notes about the concepts you've learned and code cells with code you want to keep.
Add your notes here
# Add your code snippets here
print(tweets_file)
wine.head()
Current Type: Bar
Current X-axis: chlorides
Current Y-axis: quality
Current Color: None
latitude.tail()
Current Type: Line
Current X-axis: country
Current Y-axis: 1700
Current Color: None