Pandas Basics

Pandas Basics

Assessment

Flashcard

Computers

Professional Development

Practice Problem

Hard

Created by

Omar Choudhry

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

16 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the main pandas data structure?

Back

pandas.core.frame.DataFrame

2.

FLASHCARD QUESTION

Front

What function is used to read a CSV file in pandas?

Back

pd.read_csv('csv_name.csv', index_col=0)

3.

FLASHCARD QUESTION

Front

Why set index_col=0 in pd.read_csv?

Back

To remove the index column altogether, as pandas sets it to 1 by default.

4.

FLASHCARD QUESTION

Front

What does index_col=1 represent in pd.read_csv?

Back

Whatever the first column's data is (ex. could be company name, advisor name, etc...).

5.

FLASHCARD QUESTION

Front

How do you import the numpy or pandas modules?

Back

Import pandas as pd

import numpy as np

6.

FLASHCARD QUESTION

Front

How do you check the first few rows of a DataFrame in pandas?

Back

Use the df.head() function.

ex. f500.head()

You can enter in an argument into head to signify how many rows you want to view so f500.head(10) will display the first 10 rows.

By default it's set to 5

7.

FLASHCARD QUESTION

Front

What method is used to remove missing values in a DataFrame?

Back

Use the df.dropna() method.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?