Read CSV - PANDAS Read CSV Flashcards

1
Q

Read CSV Files - A simple way to store big data sets is to use CSV files (comma separated files).

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

CSV files contains plain text and is a well know format that can be read by everyone including Pandas.

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Use to_string() to print the entire DataFrame.

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If you have a large DataFrame with many rows, Pandas will only return the first 5 rows, and the last 5 rows:

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MAX_ROWS - The number of rows returned is defined in Pandas option settings.

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You can check your system’s maximum rows with the pd.options.display.max_rows statement.

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If DataFrame contains more than 60 rows, the print(df) statement will return only the headers and the first and last 5 rows.

A

Read CSV Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You can change the maximum rows number with the same statement.

A

print(pd.options.display.max_rows)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Increase the maximum number of rows to display the entire DataFrame:

A

pd.options.display.max_rows = 9999

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Exercise - CSV is short for:

A

Comma Separated Values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a correct syntax for loading a .csv file into a DataFrame?

A

df = pd.read_csv(‘data.csv’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

By default, if you print a large DataFrame with the print(df) function, Pandas will only return a selection of the data. How many rows will be returned?

A

10, the headers and the first and last 5 rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly