Long before going deep dive into the session, let's have a quick recap of what we all have done in
all our previous session.
So from importing this data, we have the data from databases as well as from our seats flight that
we have perform analysis on our data using this explo, which is exactly my sentiment analysis with
respect to this summary feature after we have analyzed here what exactly the expatriated analysis for
positive sentiment or you can say positive sentences.
So this is exactly the accelerated analysis for our positive sentiment.
So in this session, we have this assignment.
The very first one is we have to perform this exploratory analysis for the negative sentences.
And this is exactly the second statement in which I have to analyze to what type of users Amazon can
recommend more product.
So it's a very popular use case of Amazon.
And believe me, it's a very popular use case of Amazon.
So so, yeah, let's let's go ahead with very first statement in which you have to perform this analysis
so what you guys can do rather than writing code again and again, I'm going to share your trick.
Just copy and paste.
Yeah.
Because most of the time you have to do this as well.
So I'm just going to copy and just going to paste, just do some modifications.
That said, here I am going to say it is less than zero.
And here I will say this time my data is nothing but data on this go negative.
So now what we have to do in this huge chunk of data, you will figure out you have to just combine
this huge chunk of data here.
I'm going to say I have to combine now, but make sure you have to combine in this data on a score negative
data.
So I have to just combine all this stuff here.
I'm going to say this my total and a score text, too, so just executed.
Now what you have to do, you have to perform some cleaning on your data.
So which is exactly this one.
So now I have to just paste over here and this time I'm going to save my data is total tax too.
And this is also total tax to now what we have to do.
We have to remove some extra spaces if it is available in data.
So let me check if it is available in data.
Not so.
You will figure out you still have some extra spaces.
So now what you have to do, you have to just copy these blocks of code from here and you have to just
paste over here this time.
I would say it is my tool and this is also my total in this context on a scale to just executed.
Now it's time for to generate your beautiful visual, which is exactly my workout.
So here I have to say my children to school text to this time this is my word cloud to this in my word
cloud to here.
I had to slide my word cloud two and after it all is of similar just executed.
It will take some couple of seconds to showcase that beautiful word out in front of you.
So it is exactly that word cloud here.
You will see the negative sentiment customers.
They are basically going to use these words, say disappointed, bad taste, horrible, terrible, expansive,
expected flavor, little and all these kind of keywords are user or customer are going to Praful.
So now let's move to an exponent statement in which you have to perform analysis and you have to come
up with some conclusion to what type of user Amazon recommend more products.
So far, this is what I'm going to do.
So very first you have to understand to who or you can see what type of users Amazon recommend products.
So Amazon blackmond more products to only those one who are going to buy more or two, those one who
has a better conversion rate.
So very first to have to make your data ready for your analysis purpose.
So what I am going to do in this, let me show you are things if I'm going to call this dot head or
you can also call did it or it's all up to you.
So in this doctor had you will see here you have a column, this user I'd seen this user idea.
You have to search those users to which Amazon is going to recommend product.
So in this user I.D., if I have to ask this user ID and on this, if I am going to call my end unique
number of unique user, you will observe it has that much unique.
So from that huge chunk of yuzu, you have to extract some top end users, you have to extract some
top 20 users depending upon different different qualities.
They have different different specifications.
They have like more number of products.
Those users are going to buy more.
The recommendation that a user have for it means you have to up this huge chunk of data on the basis
of this user I.D. So here I am going to say, does dot group buy on the basis of this user ID?
I have to group my data once I recoup my data.
I had to aggregate my all of the features.
So here I am going to say, oh, I need total summary of each and every user.
I need this total summary of what I can say.
I need count of summary of each and every user.
So here I am going to say I have to aggregate and I have to aggregate the summary as by performing my
count toward you in a similar way.
I'm going to say on this text I'm also going to perform my count because I need every user has given
how much number of feedbacks.
So I'm going to say on this text, I have to just perform this count operation.
And after it, I'm just going to say I just need a meniscal of each and every user.
So here I am going to say I need a mean score.
So is goal.
And here you have to mention that data in the form of dictionary.
And now what you have to do in this product ID, you have to perform again, gone because I have to
find you each and every user has.
But how many number of products?
So here I am going to say on this product ID, I have to just perform this count operation now if I'm
going to execute this blocks of code.
So it will exactly return me this beautiful statistics on which you have to analyze this data.
So let's say I have to short this data frame.
Let's have to short this all the stuff.
So for this, I'm going to say not short on this core values.
And here you have a parameter which is exactly your by.
So here I am going to say I have to short this on the basis of basically this text.
I'm going to say I showed this on the basis of X, then I have to show this data any form of, let's
say, descending order for this.
I have to set my ascending parameter as false because by default it decides to just execute it again.
It will take some couple of seconds.
Now, in this table, you will figure out this user has that much number of somebody that has given
that much number of feedback's.
This user has that much meniscal and he has bought that much number of product.
So it is a beautiful statistics with respect to each and every user I.D..
Now, you will say that all these are exactly my top 10 users.
You will see let's say I have to store it somewhere.
Let's say I will say it is my let's say recorded of him.
It's all up.
You know what I'm going to do if I'm going to print now in this raw data frame?
What we have to do, we have to manage.
It is still the column names.
So here I am going to say are the DOT columns.
Let's say I have to assign my own column name next to the very first column.
Name that I have to assign is exactly my, let's say, number of some B so here I'm going to say number
of summaries.
The second column name that I want to assign is exactly my let's say num underscore text or number of
text.
The third one is exactly my let's say average on this score, average score or you can say it is meniscal
and the fourth column, which is exactly as it is.
I have to assign, let's say, number of product that are usable, just our number of products user
purchased are purchased.
It's all appeal whatever column name you want to assign.
Now, after doing all these things, let's say I have to just print my data and just execute it.
This is that finally the frame that you have to consider for your visual purpose.
Now, let's say from this huge chunk of data, I just need my top ten users.
So I'm just going to say I'm going to use my body plot from my matplotlib.
So I'm going to save BLT Dot Dot and here, if you will, press crosstab.
You will figure out all these custom parameters of the sanction, what is X, what is all these kinds
of things?
What is X height, weight and all these things, let's say on X axis?
I just need the user I.D. for this.
What I'm going to do, I'm just going to say it is nothing but my, let's say, raw dot index.
And in this index I just need my top 10 index.
Let's say I have to store it somewhere.
So for design, I'm say to nothing but my user and the score then.
So just executed.
Now what we have to do very first on this X, we have to assign this user 10 and now we have some other
parameter.
The second parameter, the most important one is exactly your height.
Let's say in this height, I just need this count.
So here I'm going to say it is nothing but my raw all.
Let's say a number of or you can say number of product purchased.
So here I will say it is nothing but a number of punches and I just need to top ten people, whatever
you want, I have to store it somewhere else.
So I'm going to say it is nothing.
But my number underscored ten just executed.
Now you have to pass this number underscored that over here.
Now you have some additional parameters.
Let's say what label you want to assign to my label is nothing but my let's say whatever label you want
to assign, let's say most recommended users.
So I'm going to say most are recommended users.
And after it, what I am going to do, I'm just going to execute it.
It will take some couple of seconds.
You will still see over here this graph looks a little bit messy and still you don't have some extra
button available.
So for this, let's say I'm just going to assign some X level using this BLT dot X label.
And let's say my ex label is, let's say user I.D. And after it, we have to assign some white label
as well.
So my label is nothing but let's say no product Porchester here.
I would say number of dollars for change and after that we have to rotate our X label as well.
So for this I would say BLT dot, x, x and here I have a barometer which is exactly my rotation parameters.
Here I'm going to say rotation.
It goes to all the girls.
So execute it.
It will take some couple of seconds.
And this is a beautiful stat that you exactly need.
And if you want some more beautiful with additions, you guys can go ahead with module that we all are
going to cover in all our upcoming projects.
So from this board plot, you will conclude these are exactly my top ten users so we can recommend more
and more product to this user ID as there is a high probability that this person are going to buy the
product.
So that's all about this conclusion.
That's all about this problem statement as well.
I hope you love the session very much.
Thank you.
Have a nice day.
Keep learning.
Keep growing, keep motivating.