colab : Google Cloud Platform

Colab is a Cloud based platform for Python and Machine Learning.

All libraries are already available and you only have to import them to start using. You need one google account to start using colab.

You can share your Juytor notebook files through colab platform. Keep your files in google drive and share them with others.

Adding CSV or Excel files to your code.

We can keep our CSV or Excel files in google drive and use it in our Colab platform.
  1. Upload your CSV or Excel file to any folder in google drive. We created one folder inside our Colab Notbooks folder and named it as downloads. You can give your own name to the folders.
  2. Now you have to mount the drive to your colab file. Run this code.
  3. from google.colab import drive
    You will be shown one link and below it there will be an text bos asking for authorization code. Visit the link and collect ( copy ) your authorization code. You must be already logged in to your gmail account to get the code.
    Paste the code inside textbox and then press enter.
    Now your drive is mounted.

  4. Colab Drive Mounting
    In your left panel you can see drive icon. Expand the directory structure to reach and select your file you want to use. Right click and use copy path.
    Now use this path to create a variable to use in our read_excel() or read_csv() functions.
    import pandas as pd
    path='/content/drive/My Drive/Colab Notebooks/downloads/my_file.xlsx'
    my_data = pd.read_excel(path)
Connecting to CSV file on network.
max() Iterator any()

Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 All rights reserved worldwide Privacy Policy Disclaimer