Join DataFrames Flashcards

1
Q

If the two dataframes have columns with the same name, how can you join the two datasets

A

dataset1.join(dataset2, dataset1.col(“address_id”) === dataset2.col(“address_id”))

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

What is the default join

A

inner join

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

with union, how is the data merge

A

based on the position of the columns and not the name of the columns
only as long as the data type is the same

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

How can you union by column name

A

.unionByName

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