Numpy And Pandas Flashcards

1
Q

What is a data frame and a series?

A

I’m pandas, a datagrams corresponds to column and rows (I.e. like a table or spreadsheet).

A series is a 1-d data frame - think of it like just a column (in pandas)

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

What can a data frame be loaded from?

A

Sql, csv, excel file etc.

Or from a lost, dictionary or list of dictionaries

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

Why is the setindex method important in pandas and what can happen if you don’t set an index?

A

the loc function does not work if you try to locate a piece of data without having first set (e.g. it’s column name) as an index

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

which indices get used in what order in pandas? I.e. is it [row,column] or [column,row]?

A

[row,column]

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