create account

Google Colab - How to Use NumPy in Google Colab by devpress

View this thread on: hive.blogpeakd.comecency.com
· @devpress ·
$4.17
Google Colab - How to Use NumPy in Google Colab
In this post, we are going to see How to Use NumPy in Google Colab. Numpy is one of the scientific library that you can use with Python for mathematical and data science computing. Previously in my introductory article on the [Google Colab Tutorial](https://hive.blog/hive-122108/@devpress/google-colab-how-to-use-google-colab-for-python), you'd find some interesting things you can learn about the Google Colab notebooks. 

I assume that you have gone through my previously pointed article and now have the access to one of the Google Colab notebook. So we are going to take a look at the Numpy library. 

There is a lot that you can do and use with the Google Colab. Some of the things that you would be using it for is using it for arrays, dataframes and also for doing the mathematical actions on the same.

I have created a video to give you an overview on how to use the Google Colab and Numpy Library for the data science work. You should give this one a try.

---
https://www.youtube.com/watch?v=DzLqab457_E
---

### Open Notebook
---
By the time you finish the video, you get the idea of what we are going to be doing in this tutorial. And the thing is that we are carrying out everything within the Jupyter notebook. In case of the Google Colab notebook it should look something like the notebook below. 


![eYoGT.png](https://images.hive.blog/DQmVPED8EMtV1J6GVdMa93bZ6yotPiSRb5YemBTpokCZsjQ/eYoGT.png)

### Use Numpy
---
There is a typical way to install the libraries in the python notebook. In case of the Google Colab that would be different in most of the cases. I'd say in case of the installation you can use the following commands. 

>!pip install numpy

After you install it and get the message you can go ahead and start testing your code as well. You can type in the below code and see the output by pressing the run button or doing it from the menu.


![carbon.png](https://images.hive.blog/DQmRPukfhxpAGGPvjkyangNyJCVVKup6VG3kS5NjjB79VHR/carbon.png)

### Numpy functions You Should try Out
---
Numpy is a vast library and some of the functions you would use a lot. And a lot of those functions you would not want to use. Some of the time that is what leads to solving the problems. I realized that finding use for those functions and using them in your code would save your time for some specific set of the use case. 


![carbon(1).png](https://images.hive.blog/DQmSb6rEWVptiMBUjGnpm3ZZ7SaCivfq6ShmrarbbYT8GZC/carbon(1).png)


Angle functions, arithmetic functions are the two that you would most commonly used functions. And if you dealing with a lot of float values then you would use the rounding functions. And then there are some of the functions which you would call for the simple math operations which are specific to the logarithmic work too. 

---

Now that you have learned about the Google colab and the Numpy library. You would find some seriously good use for the numpy library with the simple yet complex math operations. Some of the time all that you would have to use is for the simple work that you can quickly do yet stay accurate on the output. 

Next I would love to cover the other libraries like matplotlib, pandas and also the pytorch. That would pretty much get you up and moving in the data science work. You can do a lot of data science work from the google colab itself. It saves you money being spent on buying the high end spec computer. As most of the work is done on the cloud. 

If you happen to like this content, do give me feedback over there and that would help me improve my efforts in near future.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 231 others
properties (23)
authordevpress
permlinkgoogle-colab-how-to-use-numpy-in-google-colab
categoryhive-122108
json_metadata{"tags":["stem","archon","cent","programming"],"image":["https://img.youtube.com/vi/DzLqab457_E/0.jpg","https://images.hive.blog/DQmVPED8EMtV1J6GVdMa93bZ6yotPiSRb5YemBTpokCZsjQ/eYoGT.png","https://images.hive.blog/DQmRPukfhxpAGGPvjkyangNyJCVVKup6VG3kS5NjjB79VHR/carbon.png","https://images.hive.blog/DQmSb6rEWVptiMBUjGnpm3ZZ7SaCivfq6ShmrarbbYT8GZC/carbon(1).png"],"links":["https://hive.blog/hive-122108/@devpress/google-colab-how-to-use-google-colab-for-python"],"app":"hiveblog/0.1","format":"markdown"}
created2022-09-23 12:39:27
last_update2022-09-23 12:39:27
depth0
children3
last_payout2022-09-30 12:39:27
cashout_time1969-12-31 23:59:59
total_payout_value2.123 HBD
curator_payout_value2.051 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,561
author_reputation55,061,325,071,240
root_title"Google Colab - How to Use NumPy in Google Colab"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,862,667
net_rshares6,861,165,133,829
author_curate_reward""
vote details (295)
@curation-cartel ·
![1UP-PIZZA.png](https://files.peakd.com/file/peakd-hive/curation-cartel/23xediR4hotaNsS5pUJrmYVg3YGeTLpui41uCij2jhUDZ4uFT84zoGJf8a8VnfELXLJgt.png) |  <div class="phishy"><u><h4>You have received a __1UP__ from @gwajnberg!</h4></u></div> The @oneup-cartel will soon upvote you with:<hr> __@stem-curator, @cent-curator__ <hr>_And they will bring !PIZZA 🍕._
-|-

<sup>[Learn more](https://peakd.com/hive-102223/@flauwy/the-curation-cartel-1up-trigger-smart-voting-mana-and-high-delegation-returns-for-14-different-tribes) about our delegation service to earn daily rewards. Join the Cartel on [Discord](https://discord.gg/mvtAneE3Ca).</sup>
properties (22)
authorcuration-cartel
permlinkre-google-colab-how-to-use-numpy-in-google-colab-20220923t154812z
categoryhive-122108
json_metadata"{"app": "beem/0.24.26"}"
created2022-09-23 15:48:12
last_update2022-09-23 15:48:12
depth1
children0
last_payout2022-09-30 15:48:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length638
author_reputation1,123,281,846,602
root_title"Google Colab - How to Use NumPy in Google Colab"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,867,637
net_rshares0
@gwajnberg ·
That is a good tip since numpy is important dor python programming
!1UP

<a href="https://discord.gg/zQrvxAu7mu">
<img src="https://files.peakd.com/file/peakd-hive/thecuriousfool/23wCNFDyCLJu1v77TTg2MYKkd7XWkgF9fhiLujTDAaLaUz7H4AaQkDentB5UMVS8FcrVs.png"></a>
properties (22)
authorgwajnberg
permlinkre-devpress-2022923t94331641z
categoryhive-122108
json_metadata{"tags":["hive-122108","stem","archon","cent","programming"],"app":"ecency/3.0.34-mobile","format":"markdown+html"}
created2022-09-23 15:43:30
last_update2022-09-23 15:43:30
depth1
children0
last_payout2022-09-30 15:43:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length258
author_reputation149,619,952,421,366
root_title"Google Colab - How to Use NumPy in Google Colab"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,867,488
net_rshares0
@stemsocial ·
re-devpress-google-colab-how-to-use-numpy-in-google-colab-20220923t223858135z
<div class='text-justify'> <div class='pull-left'>
 <img src='https://stem.openhive.network/images/stemsocialsupport7.png'> </div>

Thanks for your contribution to the <a href='/trending/hive-196387'>STEMsocial community</a>. Feel free to join us on <a href='https://discord.gg/9c7pKVD'>discord</a> to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.&nbsp;<br />&nbsp;<br />
</div>
properties (22)
authorstemsocial
permlinkre-devpress-google-colab-how-to-use-numpy-in-google-colab-20220923t223858135z
categoryhive-122108
json_metadata{"app":"STEMsocial"}
created2022-09-23 22:38:57
last_update2022-09-23 22:38:57
depth1
children0
last_payout2022-09-30 22:38:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length565
author_reputation22,460,334,324,555
root_title"Google Colab - How to Use NumPy in Google Colab"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,876,758
net_rshares0