Midterm 1 Study Guide

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/47

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

48 Terms

1
New cards

abs()

returns the absolute value of the function in the parentheses

2
New cards

round(x,y)

rounds x to y digits to the right of the decimal. y can be negative to round to the 10s/100s place, and if left blank rounds to the nearest integer. If 0.5, rounds to the nearest even integer.

3
New cards

table.show(x)

shows x number of rows of the table as a picture(can’t do functions on it)

4
New cards

table.select(x)

creates a new table with only the ‘x’ columns

5
New cards

table.drop(x)

creates a new table without the ‘x’ columns

6
New cards

table.where(x, y)

creates a new table with only the values in column x that meet condition y

7
New cards

table.sort(x)

sorts the table by column x, from least to greatest. can put “, descending = True” after x to sort the table from greatest to least

8
New cards
9
New cards

When is a float returned as an answer

when one of the variables is a float or division is used.

10
New cards

‘string’ + ‘string’

‘stringstring’

11
New cards

‘string’ * 3

‘stringstringstring’

12
New cards

int(‘x’) & Condition

returns x as an integer

X can’t have decimals

13
New cards

float(‘x’)

x.0

14
New cards

type(x)

returns the type of value that x is

15
New cards

make_array('x’, ‘y’, ‘z’)

makes an array with elements x, y, z

16
New cards

array *, /, -, +, ** x

applies the function to each individual value of the array

17
New cards

len(x)

returns the # of columns in a table or the # of items in an array

18
New cards

array.item(x)

returns the item in the array(starts at item 0, can be negative)

19
New cards

np.arange(x) OR np.arange(y,z)

gives an array with x # of values in it

OR

gives an array starting at y and ending at the last value less than z

20
New cards

Table.()

creates an empty column

21
New cards

.with_column(x,y)

adds a column with title ‘x’ and array ‘y’ as its values

22
New cards

.num_rows OR .num_columns

gives the number of rows or columns in a table

23
New cards

.labels

gives the names of the columns of a table

24
New cards

.set_format(x, PercentFormatter)

Makes a decimal into a percent

25
New cards

table.plot(x,y)

makes a line graph with axes “x” and “y”

26
New cards

table.relabeled(x,y)

x is either a number(starts at 0, goes from left to right) or the name of the column. y is the new label

27
New cards

plots.ylim(x,y) OR plots.xlim(x,y)

sets the lower bound of a line plot axis at x and the upper bound at y

28
New cards

table.scatter(x,y, group = z)

scatterplot with “x” on the horizontal axis and “y” on the vertical axis, and with different colored dots based on grouping z.

29
New cards

table.take(x) or table.take(np.arange(y))

takes the (x-1)th value of a table and makes it a new table

makes a new table with the top y values from the table

30
New cards

table.barh(‘x’, ‘y’)

creates a bar chart with ‘x’ as the horizontal axis and ‘y’ as the vertical axis

31
New cards

table.group(‘x’)

creates a new table with columns “x” and “count”

32
New cards

table.bin(x, bins = np.arange(y,z,a))

arranges variable x into bins ranging from y to z spaced “a” apart

33
New cards

table.hist(x, bins = y, (normed = False))

creates a histogram of variable x with bins y; it has percent per unit x as the default y variable

if normed = False, uses Count as the y-axis variable

34
New cards

plots.plot(x,y)

creates a graph of the given x values and the given y values. can use arrays for both to make line segments.

35
New cards

plots.title(x)

titles the plot “x”

36
New cards

def function(x):

return (function 2)

defines function of x as function 2

NOTE: variables defined in the function cannot be called later on

37
New cards

string.count(x)

count the number of “x” in the string

38
New cards

table.apply(x,y)

applies function x to column y

39
New cards

np.unique(x)

gives the unique values in array x

40
New cards

plots.axvline(x)

puts a vertical line at a specified x value on a plot

41
New cards

table.group(x,np.y)

creates a table grouped by value x, with the np.y function applied to the values it displays

42
New cards

table.pivot(x,y,z, (np.a))

creates a 2 way table with x as the column grouper, y as the row grouper, z as the measured variable, and np.a as the function applied to the values.

43
New cards

table1.join(x,y,z)

adds a new column to table1, matching the values in column x to the values in column z from table y. Unmatched values will not display in the table.

44
New cards

Table().read_table(x)

makes a table with the values read from table x.

45
New cards

np.diff(array))

returns another array with n-1 values about the difference in the values (n2-n1, n3-n2, etc.)

46
New cards

are.between(x,y)

are.between_or_equal_to(x,y)

are.strictly_between(x,y)

greater than or equal to x, and less than y

greater than or equal to x, and less than or equal to y

greater than x and less than y

47
New cards

are.contained_in(A)

is a substring of A(string) or element of A(array)

48
New cards

are.containing(S)

contain the string s