Python - For data science Flashcards

1
Q

What are Jupyter notebooks?

A

workspaces for interactively developing data science code

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

What do Jupyter notebooks consist of?

A

sequential cells, the bracketed numbers indicate the order in which the cells have been executed

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

How are datasets stored?

A

In CSV files (these store tables in plain text format, commas are used to separate text in the table)

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

What is pandas?

A

A library for data analysis

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

What is a python library?

A

Collections of pre-written code and functions

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

How do you import the python library pandas?

A

import pandas as pd

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

How do you import a CVS?

A

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

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

How do you preview a CVS?

A

df.head()

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

How do you view the data types in a data frame?

A

df.dtypes

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

int64

A

integers

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

float64

A

decimals

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

object

A

text

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

What does it mean if data is categorical?

A

It comes from a small set of predetermined values

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

What are variables used for in python?

A

To store data

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

How do you define a variable with a value?

A

variable = value
(eg. months = 12 )

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

What is a boolean variable?

A

A variable that equals True or False (without quotation)

17
Q

Python code is run from…

A

Top to bottom (After both lines are run the variable takes the bottom value)

18
Q

How do you reassign a variable in Python?

A

Write a line of code under the previous line of code

19
Q

In Python where do you start counting entries from?

A

0

20
Q

How do you add entries to a list?

A

list_name.append(new_entry)

21
Q
A