Pandas Basics

Pandas Basics

Assessment

Flashcard

Computers

Professional Development

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.

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?