Skip to content

How to use a colab, upload or import data, csv use and import image file will be shown in here.

Notifications You must be signed in to change notification settings

SaadAhmedSalim/GoogleColabLearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Made withJupyter Open In Collab

GoogleColabLearning

How to use a colab, upload or import data, csv use and import image file will be shown in here.

Requirements:

  • A google account

  • A Kaggle account (necessary)

Description:

Check this link to understand what is colab and how to use it. Google Colab

Methods

1st of all install the dependencies.

Then upload the credieentials of the kaggle account. For this,

  • you have to go to your kaggle account

  • select my account option

  • Scroll down, there will be a row called API , there you will find a option named "create new api"

  • save the file.

from google.colab import files

files.upload()
  • then upload the saved file from your directory.

Before import a dataset, use these code

!mkdir -p ~/.kaggle

!cp kaggle.json ~/.kaggle/

!chmod 600 ~/.kaggle/kaggle.json

More details in this Blog and Kaggle

For importing the dataset that you want to use for your project,

  • go to the dataset

  • on the right side, beside the "New Notebook" there will be option,

  • click that, you will find a option named "copy api command"

  • copy that, and paste it in your code.

!kaggle datasets download -d chiragsoni/ferdata
(Like This)

If you see a CSV file than use pandas command like

  import pandas as pd 
 
  df = pd.read_csv('filename')
  
  df.head()

Details in Here

If you have a zip file, then unzip it first

!unzip filename

For image file,

from IPython.display import Image

Image('file')

Details in here (Documentation), here (IPython for notebook) and here .

About

How to use a colab, upload or import data, csv use and import image file will be shown in here.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published