Practice Worksheet- Informatics Practices

Practice Worksheet- Informatics Practices

12th Grade

17 Qs

quiz-placeholder

Similar activities

AV1\R1 3TEC_Ciência de Dados - Aula 01 a  16

AV1\R1 3TEC_Ciência de Dados - Aula 01 a 16

1st Grade - University

15 Qs

MySQL- group by and foreign key

MySQL- group by and foreign key

12th Grade

13 Qs

Ciência de Dados

Ciência de Dados

12th Grade

14 Qs

My SQL- DDL

My SQL- DDL

11th Grade - Professional Development

20 Qs

Python Basics Review (TSK)

Python Basics Review (TSK)

9th - 12th Grade

20 Qs

python-series

python-series

12th Grade

20 Qs

Series & DataFrame [02-07-2021]

Series & DataFrame [02-07-2021]

12th Grade

12 Qs

Python CSV and Pandas

Python CSV and Pandas

12th Grade

15 Qs

Practice Worksheet- Informatics Practices

Practice Worksheet- Informatics Practices

Assessment

Quiz

Computers

12th Grade

Hard

Created by

JEEN JO

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assuming the given series, named stud, which command will be used to print 5 as output? Amit 90 Ramesh 100 Mahesh 50 john NaN Abdul 89 Name: Student, dtype: int64

stud.index

stud. length

stud. values

stud.size

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be produced by the following python code? (Assuming that all necessary libraries and modules are imported) series1 = pd.Series(np.array([31,28,31,30]), index = ["Jan", "Feb", "Mar"]) print(series1)

Error: Length of passed values is 4, index implies 3

No output

Jan 31 Feb 28 Mar 31

Jan 31 Feb 28 Mar 31 Apr NaN

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to return both the first column and the second column in a pandas DataFrame df? (considering default labels for rows and columns)

df.loc [ : ,0,1]

df[[0,1]]

df.loc[[0-1]]

df.loc[[0,1]]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To rename the row indices 'Emp1' to 'Manisha', 'Emp2' to 'Shreya', 'Emp3' to 'Roshan' and 'Emp4' to 'Rakesh' in a data frame EmpD, Which of the following statement (a) to (d) will be used?

EmpDF=EmpDF.rename({'Emp1':'Manisha', 'Emp2': 'Shreya', 'Emp3': 'Roshan', 'Emp4': 'Rakesh'}, axis = 'index')

EmpDF=EmpDF.rename({'Emp1':'Manisha', 'Emp2': 'Shreya', 'Emp3': 'Roshan', 4': 'Emp 'Emp4': 'Rakesh'}, axis = 'rows')

EmpDF=EmpDF.rename(['Emp1':'Manisha', 'Emp2': 'Shreya', 'Emp3': 'Roshan', 'Emp': 'Rakesh'], axis = 'index')

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The correct statement to read from a CSV file in a DataFrame is:

.read_csv()

. read_csv( )()

=pandas.read()

= pandas.read_csv()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following command is used to display values of all the records having price>3?

print(df[df['price']>3])

print(df['price']>3)

print(df.price>3])

print(df('price')>3)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be used to specify the data while creating a DataFrame?

Series

List of Dictionaries

Structured ndarray

All of these

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?