Pandas Flashcards

1
Q

Attributes and underlying data

The index (row labels) of the DataFrame.

A

Dataframe.index

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

Attributes and underlying data

The column labels of the DataFrame.

A

Dataframe.columns

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

Attributes and underlying data

Return the dtypes in the DataFrame.

A

Dataframe.dtypes

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

Attributes and underlying data

Print a concise summary of a DataFrame.

A

Dataframe.info()

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

Attributes and underlying data

Return a subset of the DataFrame’s columns based on the column dtypes.

A

DataFrame.select_dtypes

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

Attributes and underlying data

Return a Numpy representation of the DataFrame.

A

Dataframe.values

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

Attributes and underlying data

Return a list representing the axes of the DataFrame.

A

Dataframe.axes

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

Attributes and underlying data

Return an int representing the number of axes / array dimensions.

A

Dataframe.ndim

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

Attributes and underlying data

Return an int representing the number of elements in this object.

A

Dataframe.size

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

Attributes and underlying data

Return the memory usage of each column in bytes.

A

Dataframe.memory_usage()

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

Attributes and underlying data

Return a tuple representing the dimensionality of the DataFrame.

A

Dataframe.shape

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

Conversion

Cast a pandas object to a specified dtype

A

Dataframe.astype()

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

Indexing, iteration

Return the first n rows.

A

Dataframe.head()

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

Indexing, iteration

Access a single value for a row/column pair by integer position.

A

Dataframe.iat

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

Indexing, iteration

Access a group of rows and columns by label(s) or a boolean array.

A

Dataframe.loc

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

Indexing, iteration

A
17
Q

Indexing, iteration

Purely integer-location based indexing for selection by position.

A

Dataframe.iloc

18
Q

Indexing, iteration

Insert column into DataFrame at specified location.

A

Dataframe.insert()