Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

PANDAS HW Due Wed May 5th 1) Import pandas as pd a. Create a series of 5 dog names b. Create a series of 5 dog’s ages c. Create a data frame that has dog names as the index and two columns of data....

1 answer below »
PANDAS HW

Due Wed May 5th


1) Import pandas as pd
a. Create a series of 5 dog names
. Create a series of 5 dog’s ages
c. Create a data frame that has dog names as the
index and two columns of data. First column is
the age, and second column is “yes” or “no” for
eing adopted.
d. Locate the data for each dog
e. Locate all adopted dogs
2) Create a data frame with 5 athletes include columns
and data for win percentage, age, and sport (two
athletes should play the same sport for this -
problem). Make sure to populate your data frame
with data.
a. Locate each athlete’s data
. Locate athlete’s data that play the same sport
3) Create a data frame with your choice of index,
columns, and data.
a. There should be at least 3 data columns in your
data frame.
. Locate two different indexes in your data frame.
Answered Same Day May 05, 2021

Solution

Gaurav answered on May 06 2021
155 Votes
import pandas as pd
Dgnames = ["Tommy", "Shero", "vinee", "jackie", "facebook"]
Dgage = [12, 11, 4, 7, 3]
dgdic = {"age": Dgage, "names" : Dgnames, "isAdopted": ["yes", "no", "yes", "yes", "no"]}
df = pd.DataFrame(dgdic)
df.set_index("names", inplace=True)
#getting info for each dog
for...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here