Membership Constraints Flashcards

1
Q

What is the set()?

A

are used to store multiple items in a single variable.

stores its unique values

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

What is Anti-Join?

A

take in two DataFrames A and B, and return data from one DataFrame that is not contained in another. we are performing a left anti join of A and B, and are returning the columns of DataFrames A and B for values only found in A of the common column between them being joined on.

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

What is Inner Join?

A

return only the data that is contained in both DataFrames. For example, an inner join of A and B, would return columns from both DataFrames for values only found in A and B, of the common column between them being joined on.

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

How do you find inconsistent categories?

A

You do set to find the unique values

inconsistent_catergories= set(dataframe[column]).difference(categories[column])

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

What is the difference()?

A

the method returns a set that contains the difference between two sets.

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

How do you find inconsistent rows?

A

inconsistent_rows= dataframe.[column].isin(inconsistent_categories)

subset data:

inconsistent_data= dateframe[inconsistent_rows]

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

What is the isin() method?

A

a method is used to filter data frames. isin() method helps in selecting rows with having a particular(or Multiple) value in a particular column

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

How do you drop inconsistent rows?

A

consistent_data= dataframe[~inconsistent_rows]

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

What is member constraint?

A

a membership constraint is when a categorical column has values that are not in the predefined set of categories of your column.

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