Hey everyone in this video we are going to learn about joining joining in something when we need to
join two or more data frames into one than we used to join.
Similar to joining we have two more little concept that is merging and concatenation that are also used
for the same purpose but something different.
So that's what we are going to learn later to know we have learned all the concepts about the data frame
but not the something that can join two or more different.
So here we will take example of two data frames that are built by using two dictionaries that are excellent
and waiver.
So here we have X1 and any random dictionary like a column name.
And then the values like One two three.
Then we have something B.
And the values will be like five six and seven.
Now for y we have seen so we have different column names.
And here we have three four five.
And then we have these.
Here we have this one like two three five or six.
So here we go with this one.
Now we will convert these two in to redefine.
That is x and y so to convert that one just try to BD dot here.
Data from
F capital and three.
And in that one positive parameters that is first X1 and the wide indexed like here we have something
random that is B B2 then between make sure these are indexes.
So they require courts also.
Otherwise it will show you error just copy this for now and paste in this one and just change y one.
So here we are done with Dedmon.
Now if you write X1 you get this and via you get decision not to join these means like I have this one
and this one I also get that one here.
So to join that we have a simple matter that is X or join the one that you need first like here on the
left and then in parentheses we passed the one that we need on right like y you will get this one Hey
I have one two three four five six seven then I have three four five and two three six here if you press
shift tab here you will find different bunch of options like how that is the one we are going to using
these joining and concatenation is so how is something if you write that here you have four types of
options that is left and in Melbourne's index how
sorry I not have a comma there.
Now this one and one thing here we have this same because it this index values that is B1 B twenty three.
So here.
Now the default options like left then we have right.
Notice this one this is the same that we have something known as in this one is by default if you do
not choose how lender in it is by default then we have one out there so then the indexes are same all
this will be seen.
And now if I do something like change this one in two we do hear this one before and this one five and
do something like this joint you will get this one here you have one two three five six seven then we
have C with indexed B1 and the values in X that do that have before and three five and then and similarly
invite we have twenty three men if you know change this one in two if not you will get this one the
only one that have same index is if you do this one like left you will get disciplined only those values
that like this one is the left.
And here this have indexed B1 p2 p3 so you will find only P1 between P3 that's left when this left stands
for the low we can see data frame on the left if you convert this one into right you will find only
overwrite like P1 before and faith indexes or this.
And if you do not have any index in common like.
If I make this one before this one B5 and this one B6 and do something like this one you will get only
this one values in X will be met because knowing next is seen so here it is right he finds that which
index are going to be covered here on the output.
So this is about the joining.
And this one is over really easy and little concept just X do not join in panties.
The one on the right.
And if you want these then you can add these also.
If you do like this one you do not pass and even then dinner one by default and that will not equal
to way.
Now we are done with this one and we will continue in the next video.