Doubt Week 8 (numpy)

Hey!
Can anyone explain me axis thing…

np.mean(cric_data, axis = 0)

what does axis = 0 take as input? like all the rows or all the columns?

Also,
While solving the problems i was getting different answers for mean, median and iqr of sachin, rahul and india by doing it in the same way as explained in the lecture… can anyone clarify this asap?

Hi @jsshivanshshukla,
To get you to how axis=0 or axis=1 sums up values, check the below representation:

+------------+---------+--------+
|            |  A      |  B     |
+------------+---------+---------
|      0     |    0.985|   3.647|----axis=1----->
+------------+---------+--------+
             |         |
             | axis=0  |
             ↓         ↓

For the problem that you’re facing while calculating mean, median and mode… can you please share some code snippet that you have written, or a screenshot?

1 Like

Hey! Thanks for that explaination also I have attached some screenshots including code that i used and the answrers as well.

Also if you can tell how can i have the access to the deep learning course…it would be appreciated…