Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Contacts For the following questions, the file contacts.csv is provided, with the following fields: email, first, last, phone. Data in the email field are unique

Contacts
For the following questions, the file contacts.csv is provided, with the following fields: email, first, last, phone. Data in the email field are
unique for each row and can be used as the index in a DataFrame.
Loading and getting information
a
)
Use the pandas read
_
csv
(
)
function to load the data in contacts.csv into a DataFrame. Use the email column as the DataFrame
index. Display the data in the DataFrame.
b
)
Use the info
(
)
method to determine how many non
-
null values there are for each column and what each column's type is
.
c
)
Determine the number of rows and columns using the len
(
)
function as well as the shape property.
d
)
Display the first two and last two rows using head
(
)
and tail
(
)
.
Accessing rows, columns, and cells
e
)
Display the phone column.
f
)
Display the columns named first and last in a DataFrame.
g
)
Display the phone number for the row with
email
=
smsmith@yahoo.com.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago