Python Data Science Toolbox (Part 2)
Run the hidden code cell below to import the data used in this course.
# Import the course packages import pandas as pd import matplotlib.pyplot as plt # Import the course datasets world_ind = pd.read_csv('datasets/world_ind_pop_data.csv') tweets = pd.read_csv('datasets/tweets.csv')
import csv with open('row_lists.csv', 'r', newline='') as csvfile: reader = csv.reader(csvfile) row_lists = [row for row in reader] print(row_lists) print(row_lists)
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
Use the DataFrames imported in the first cell to explore the data and practice your skills!
- Create a
zipobject containing the
world_ind. Unpack the resulting
zipobject and print the tuple values.
- Use a list comprehension to extract the first 25 characters of the
textcolumn of the
tweetsDataFrame provided that the tweet is not a retweet (i.e., starts with "RT").
- Create an iterable reader object so that you can use
datasets/world_ind_pop_data.csvin chunks of 20.