Python Pandas/MatPlotLib

Python Pandas/MatPlotLib

12th Grade

9 Qs

quiz-placeholder

Similar activities

Wrażenia globlne w Linxie

Wrażenia globlne w Linxie

10th Grade - University

10 Qs

Quiz sobre Desenvolvimento de Sistemas

Quiz sobre Desenvolvimento de Sistemas

12th Grade

10 Qs

Data Frame1

Data Frame1

12th Grade

10 Qs

Exploring Python Dataframes

Exploring Python Dataframes

12th Grade

13 Qs

DS 3

DS 3

12th Grade

10 Qs

DataFrame Revision

DataFrame Revision

11th Grade - University

10 Qs

Pandas - CSV file

Pandas - CSV file

12th Grade

10 Qs

Data Visualization Quiz

Data Visualization Quiz

9th - 12th Grade

13 Qs

Python Pandas/MatPlotLib

Python Pandas/MatPlotLib

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Brian Akwirry

Used 16+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What does df.groupby('column_name').mean() do in Pandas?

Groups the DataFrame by 'column_name' and calculates the mean of all columns

Finds the mean value of 'column_name'

Splits the DataFrame into groups based on 'column_name' and calculates the mean of each group

Sorts 'column_name' in ascending order

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

In Pandas, how do you select the rows where the column 'age' is greater than 25?

df[df['age'] > 25]

df.select('age' > 25)

df.query('age' > 25)

df['age'].select(> 25)

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How would you save a plot as a PNG file in Matplotlib?

plt.savefig('plot.png')

plt.save('plot.png')

plt.export('plot.png')

plt.write('plot.png')

4.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

In Pandas, what does df.isnull().sum() return?

The sum of all values in the DataFrame

The total number of missing values in each column

A boolean value indicating if there are any null values

The sum of non-null values in the DataFrame

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which method is used to read a CSV file into a Pandas DataFrame?

pd.read_csv('file.csv')

pd.csv('file.csv')

pd.readfile('file.csv')

pd.open_csv('file.csv')

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

In Matplotlib, how do you set the title of a plot?

plt.title('My Title')

plt.set_title('My Title')

plt.name('My Title')

plt.label('My Title')

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How can you create a new column in a DataFrame in Pandas?

df['new_column'] = value

df.add('new_column', value)

df.new_column(value)

df.insert('new_column', value)

8.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

What does df.merge(other_df, on='key') do in Pandas?

Concatenates df and other_df based on 'key'

Performs an inner join between df and other_df on the 'key' column

Merges the two DataFrames on the index

Replaces the 'key' column in df with that in other_df

9.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

In Matplotlib, which function is used to display a histogram?

plt.plot()

plt.hist()

plt.scatter()


Discover more resources for Computers