Practicing Colab Basics
I have used colaboratory before but I need some refresher course so I am going to practice and code today! :)
Starting with the basics:
- Open Colab (https://colab.research.google.com/) and create a new notebook
2. Renaming my document to YYMMDD NameInitials
3. Save a copy in your drive
4. Add text by clicking +text or add code by clicking +code
- Practicing Markdowns:
1A. Inserting Header — Use # then the header you want to use
Note: Increase the number of # to make the text smaller
1B. Bold text — Start your text with two asterisks (**) and end it with two asterisks (**)
1C. Italicizing text — Start your text with a single asterisk (*) and end it with one asterisk also (*) or an underscore( _ )
1D. Strikethrough — Use two tildes ( ~~) for strikethrough
1E. Indentation — Use ‘>” for indentation
More > will create further indentation
1F. Ordered List — Use 1. 2. 3. and so on
1G. Unordered List — Use asterisk and then put a space before typing the word
1H. Nested List
2. How to run codes
Add a code by clicking +Code
Try running a code by typing !pip install Google and then press shift + enter to run the code
2.A How to delete a cell — Click on the trash can button
2.B How to download your notebook — Click file then download
2C. Adding a comment — Click on the highlighted button
2D. Sharing a link of your colab — Click share button on the upper-right corner of the screen
Link: https://colab.research.google.com/drive/1ExrJW78RymttDzRgnpE1yZhiLWv2cNMk?usp=sharing
Let us start practicing with some data :)
Importing a library: Use import pandas as pd as an example
Uploading a file: Choose the file you would like to upload after typing the code below:
from google.colab import files
files.upload()
Loading the csv file using Pandas
Using Pandas for descriptive analytics of the dataframe: df.describe
Cleaning Data using dropna function: df = df.dropna()
Saving the new dataframe as another CSV file
Downloading CSV files: files.download(‘insert file name here’)