How to find the sum of Marks and Average of Age for the below data frame? data = { ‘Student’: [‘A’,’B’,’C’,’D’] 'Age': [29, 36, 25,40], 'Marks': [79, 56, 91,99] } df = pd.DataFrame(data) Can you provide answer for this
@@ankitbansal6 ..Thank you for the videos . that's correct. Its work with single quotes..... df.groupby('category').agg({'sales':'mean','profit':'max'})
Best explaination found so far !
Thank You sir!
Most welcome!
Mean will also work in groupby's agg function if you put it under colons like this :
df.groupby('category').agg({"sales" : "mean", "profit" : "max"})
crisp and clear !!!! please can you advise a roadmap to learn Python (any good online platform/course/book/GitHub )
This is super useful for data analysis. Waiting for this one for a long. Thank you so much
Glad it was helpful!
My dream is to become a data engineer but my sql skills are basically "from * import" 😢 gonne binge watch your channel
Sure
Excellent. Easy to understand.
Really informative videos Sir Kindly make a playlist on Python like your SQL.
Sure I will
Wow didnt know those panda functions, thank you
Happy to help
We can find mean by importing Numpy and then use np.mean
df.groupby('Team').agg({'Salary':np.mean,'Age':max})
Ok. If we give mean in quotes that also works
Pls make more vedios related to python
Thanks Sir For Sharing Such a great
Most welcome
Awesome👏👍👍
Thank you! Cheers!
when u ran group by on 2 columns, category and city, for chennai city the category is blank displayed.. why ? time 4.36 on the video
Brother can do do completely EDA in python and same for SQL because am not getting concept right so it will useful for me
Great 👍
Thank you for the tutorial!
Glad it was helpful!
Nice video 👏🏽
Thank you 🤗
How to find the sum of Marks and Average of Age for the below data frame?
data = {
‘Student’: [‘A’,’B’,’C’,’D’]
'Age': [29, 36, 25,40],
'Marks': [79, 56, 91,99]
}
df = pd.DataFrame(data)
Can you provide answer for this
Thank you 💖🙏
You are so welcome
Why do people always import pandas as pd? Why not as p or pan?
That's a general practice 😊
Please share data set
Fortunately there is no mean 😢
There is, you have to give in single quotes 😃
@@ankitbansal6 ..Thank you for the videos . that's correct. Its work with single quotes..... df.groupby('category').agg({'sales':'mean','profit':'max'})
np.mean should work ig