બધા વિષયો
TechnologyBeginnerMar 28, 2026· 8 min read

Jupyter Notebook અને Google Colab શું છે? AI એક્સપેરિમેન્ટ્સ માટેનું પ્લેગ્રાઉન્ડ — સરળ ગુજરાતી ગાઇડ

Jupyter Notebook અને Google Colab વિશે શીખો. Cell-by-Cell Coding, ફ્રી GPU, મેજિક કમાન્ડ્સ (Magic Commands) અને Google Drive સાંકળવા વિશેની માહિતી. AI શીખવવાની શરૂઆત કરતા બિગિનર્સ માટે કોઈ જ સેટઅપ વિના એક્સપેરિમેન્ટ શરૂ કરવાની સંપૂર્ણ ગુજરાતી માર્ગદર્શિકા.

Jupyter Notebook & Google Colab: AI Experiments નું Playground

Python Environment Setup થઈ ગઈ. Libraries Install થઈ. હવે Code ક્યાં લખવો?

Terminal માં? — ભૂલ આવે, Output ગાયબ, Graph ક્યાં Show?

Jupyter Notebook અને Google Colab — AI Developers ના સૌથી પ્રિય Tools — Code + Output + Notes + Graphs — બધું એક જ જગ્યાએ.


Jupyter Notebook એટલે શું?

Jupyter Notebook = Interactive Coding Environment — Code લખો, ઝટ Run કરો, Output ત્યાં જ નીચે દેખાય.

Normal Python File (.py):

  • બધો Code લખો → Run → Output Terminal માં

Jupyter Notebook (.ipynb):

  • Cell-by-Cell Code → Cell Run → Output ત્યાં જ → Next Cell

💡 Analogy: Normal .py File = Book (બધું એક સાથે). Jupyter = Interactive Workbook — Page-by-Page ભરો, જુઓ, સુધારો.


Jupyter Notebook Install અને Open

# Virtual Environment Activate કરો (Python Environment Post યાદ?)
source venv/bin/activate

# Jupyter Install
pip install jupyter notebook

# Jupyter Open
jupyter notebook

Browser Automatic ખૂલશે — http://localhost:8888

JupyterLab (Advanced Version):

pip install jupyterlab
jupyter lab

JupyterLab = Jupyter ની Modern, Cleaner Version — Side Panel, Multiple Tabs.


Notebook ની અંદર — 3 Cell Types

Jupyter Notebook 3 પ્રકારના Cells:

1. Code Cell — Python Code

x = 10
y = 20
print(x + y)

Output: 30 — Cell ની નીચે ઝટ

2. Markdown Cell — Notes / Headings

## મારો પ્રથમ AI Experiment
- Dataset: Iris Flowers
- Model: Decision Tree

Output: સુંદર Formatted Text — Documentation ભૂ

3. Raw Cell — Plain Text

Code ન ચાલે, Format ન થાય — ક્વચિત ઉપયોગ.


Important Keyboard Shortcuts

Shortcutકામ
Shift + EnterCell Run, Next Cell
Ctrl + EnterCell Run, Same Cell
Aઉપર New Cell
Bનીચે New Cell
DDCell Delete
MMarkdown Cell
YCode Cell
Ctrl + SSave

Pro Tip: Shift+Enter સસ`fast workflow — Run & Move.


Jupyter માં AI Workflow

# Cell 1: Libraries Import
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Cell 2: Data Load
df = pd.read_csv('data.csv')
df.head()              # ઝટ First 5 Rows Show

# Cell 3: Data Shape
print(df.shape)        # (Rows, Columns)
print(df.info())       # Data Types

# Cell 4: Graph
plt.plot(df['age'], df['salary'])
plt.title('Age vs Salary')
plt.show()             # Graph ત્યાં જ Notebook માં!

# Cell 5: ML Model
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X_train, y_train)
print("Score:", model.score(X_test, y_test))

બધું Notebook ના એક File માં — Code, Output, Graph, Notes.


Google Colab — No Setup, Free GPU

Google Colab = Jupyter Notebook + Cloud + Free GPU — Browser માં ખૂલો, Code લખો, Run કરો — Laptop ઉપર કંઈ Install ન કરો!

🔗 Open: colab.research.google.com — Google Account ઘરે Ready.

Colab vs Local Jupyter

Local JupyterGoogle Colab
SetupInstall જોઈએ❌ Nothing — Browser ખૂલો
GPULaptop GPU (Limited)Free NVIDIA GPU
StorageLocal DiskGoogle Drive
Offline❌ Internet જોઈએ
CostFreeFree (Limits સાથે)
ShareFile Share✅ Link Share (Google Docs જેમ)
BeginnersSetup જોઈએ✅ ઝટ શરૂ

Google Colab ઉપર First Notebook

Step 1: colab.research.google.com ખૂલો

Step 2: "New Notebook" Click

Step 3: Code Cell માં:

print("નમસ્તે, AI દુનિયા!")

Shift+Enter — Output ઝટ!

Step 4: GPU Enable: Runtime → Change Runtime Type → GPU → Save

Step 5: Libraries (Colab ઉપર Pre-Installed)

import tensorflow as tf
import torch
import pandas as pd
import numpy as np
# — Install વગર Ready!

Colab ઉપર Google Drive Connect

from google.colab import drive
drive.mount('/content/drive')

# Drive ની File Read
df = pd.read_csv('/content/drive/MyDrive/data/myfile.csv')

💡 Drive Mount = Colab ને Google Drive નો Access — Files Upload/Download Easy.


Colab GPU Check

import torch
print(torch.cuda.is_available())        # True = GPU Ready
print(torch.cuda.get_device_name(0))    # GPU Name (e.g., Tesla T4)
import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))

Colab Limits (Free Version)

Limitવિગત
Session Time~12 કલાક (Idle = Disconnect)
GPUNVIDIA T4 (Free), A100 (Pro)
RAM~12 GB (Free)
Disk~107 GB Temporary
Idle Timeout~90 મિનિટ Inactive = Session End

⚠️ Important: Colab Session End = Local Files Delete! Google Drive Mount કરો — Data Safe.


Jupyter vs Colab — ક્યારે શું?

Situationઉપયોગ
Offline, Local DataLocal Jupyter
Quick Experiment, No SetupGoogle Colab
Free GPU (Large Model Train)Google Colab
Team ને ShareGoogle Colab
Production-ready CodeLocal + .py Files
Sensitive Data (Privacy)Local Jupyter

Magic Commands — Jupyter/Colab Secret Powers

Magic Commands = Jupyter ના Special Commands — % અથવા %% થી શરૂ.

# Code ચાલવામાં Time
%time model.fit(X_train, y_train)

# બધી Variables List
%who

# Matplotlib Graphs Notebook ની અંદર
%matplotlib inline

# Shell Command Notebook ની અંદર
!pip install transformers
!ls data/

# External .py File Run
%run src/train.py

💡 ! = Terminal Command Notebook ની અંદર!pip install, !git clone — ઘણો ઉપયોગ Colab ઉ


AI Project Notebook Best Practices

Cells Numbered Order માં — Cell 1: Import, Cell 2: Data, Cell 3: EDA, Cell 4: Model

Markdown Cells — Section Headings, Notes — Future Self ને સમજાય

"Restart & Run All" — Notebook Order Check — ઉપરથી નીચે ચાલે

Output Clear — Git Commit પહેલા — File Size ઓછી

Google Drive Mount — Colab ઉપર Data Safe

.ipynb Git Ignore — Large Output Files — Optional


Colab Pro / Pro+ — ક્યારે?

FreePro (~₹900/month)Pro+ (~₹1800/month)
GPUT4A100A100 High RAM
RAM12 GB25 GB51 GB
Session12 hrs24 hrs24 hrs
Background

💡 Beginners / StudentsFree Version Plenty! Large Model Fine-tuning ઉપર Pro ઉપયોગ.


નિષ્કર્ષ

Jupyter NotebookGoogle Colab
Best ForLocal, Offline, PrivacyQuick, GPU, Share
Setuppip installZero
Beginner Friendly✅✅

🧪 AI Developer ની Journey: Python Install → venv → Jupyter/Colab → Code → Experiment → Model → Deploy

Google Colab ઉપર આજે જ Notebook ખોલો — 5 Minutes, Zero Setup, AI Experiment Ready! 🚀

AI ની દુનિયા સાથે જોડાયેલા રહો! 🚀

દર અઠવાડિયે AI ની નવી અપડેટ્સ, પ્રોમ્પ્ટ્સ અને ફ્રી માર્ગદર્શિકા સીધા તમારા ઈમેલ પર ગુજરાતીમાં મેળવો.

શું આ લેખ તમારા માટે ફાયદાકારક હતો?

તમારો પ્રતિભાવ અમને વધુ સારી માહિતી આપવા માટે મદદરૂપ થશે.

આ પણ વાંચો (Related Articles)

પ્રતિભાવ આપો