Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: a series named heights_A with values 176.2, 158.4, 167.6, 156.2, and 161.4. These values represent heights of 5 students of class A. Label each

Question:

a series named heights_A with values 176.2, 158.4, 167.6, 156.2, and 161.4. These values represent heights of 5 students of class A.

Label each student as s1, s2, s3, s4, and s5.

another series named weights_A with values 85.1, 90.2, 76.8, 80.4, and 78.9. These values represent weights of 5 students of class A.

Label each student as s1, s2, s3, s4, and s5.

a dataframe named df_A, which holds the height and weight of five students s1, s2, s3, s4 and s5.

Label the columns as Student_height and Student_weight, respectively.

  • Select the columndf_Areferring to student heights, and store it in the variableheight.Note:Specify the required column name inside square brackets.
  • Print the type of object of the variableheight.

Answer till done:

import pandas as pd

import numpy as np

heights_A = pd.Series([176.2, 158.4, 167.6, 156.2, 161.4])

heights_A.index = ['s1', 's2', 's3', 's4','s5']

weights_A = pd.Series([85.1, 90.2, 76.8, 80.4 , 78.9])

weights_A.index = ['s1', 's2', 's3', 's4','s5']

df_A = pd.DataFrame()

df_A['Student_height'] = heights_A

df_A['Student_weight'] = weights_A

The last part of question about creating height and its type is not coming

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions