🔵 Data Science  ·  Lesson 34

Jupyter Notebook and Google Colab

Jupyter Notebook और Google Colab

What is Jupyter Notebook and Google Colab?

Jupyter Notebook and Google Colab means jupyter Notebook and Google Colab are popular tools for writing Python code, notes, outputs and charts together.

In real programs, this topic helps in writing code with notes. Learn the idea first, then type the program yourself and compare the output.

💡 At a Glance
PointDetails
Course AreaData Science
Tools and concepts used to analyse, clean and present data.
Main Usewriting code with notes
Example Filejupyter-colab.py
Practice FocusRun, change values, and explain the output line by line.

Why should you learn this?

  • It is useful for writing code with notes.
  • It connects with showing charts and outputs.
  • It improves your ability to read, write and debug Python programs.

Important Terms

These terms are used directly in this lesson. Understand them before memorising the code.

TermMeaning
notebookInteractive document that mixes code, output and notes.
cellSingle executable block in a notebook.
markdownSimple text formatting used for notes in notebooks.
ColabCloud-based notebook service useful for Python and ML practice.
data science workflowdata science workflow is an important term in this topic.

Syntax / Basic Pattern

The simple pattern is: prepare data, apply the concept, then show the result.

Basic Pattern
import pandas as pd
data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]}
df = pd.DataFrame(data)
df

Complete Example Program

Python – jupyter-colab.py
# In a notebook cell
import pandas as pd

data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]}
df = pd.DataFrame(data)
df

Expected Output

Name Marks 0 Aarav 85 1 Riya 92

Program Explanation

  • import pandas as pd imports ready-made features from a module/library.
  • data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]} stores a value in data.
  • df = pd.DataFrame(data) stores a value in df.
  • df performs the next step of the program logic.

Where will you use it?

  • Writing code with notes.
  • Showing charts and outputs.
  • Sharing notebooks.

Common Mistakes

  • Analysing data before checking missing values, duplicates and data types.
  • Changing original data without keeping a clean copy.
  • Creating charts without title, labels or explanation.

Practice Tasks

  1. Type the program in jupyter-colab.py and run it.
  2. Change input values or sample data and observe the new output.
  3. Create one example related to writing code with notes.
  4. Write 5 lines explaining the logic in your own words.

Summary

Jupyter Notebook and Google Colab is not a theory-only topic. You should be able to explain the meaning, write the example, run it successfully, and use it in a small practical program.

Jupyter Notebook और Google Colab क्या है?

Jupyter Notebook और Google Colab ka matlab hai: Jupyter Notebook and Google Colab are popular tools for writing Python code, notes, outputs and charts together. Simple words me, ye topic practical Python programs likhne me direct use hota hai.

Is topic ko sirf definition ke liye nahi, balki writing code with notes jaise real examples ke liye practice karein.

यह क्यों सीखना जरूरी है?

  • Ye writing code with notes me kaam aata hai.
  • Ye showing charts and outputs se bhi connected hai.
  • Isse aap code ka output aur errors better samajh paate hain.

Important Terms

TermMeaning
notebookInteractive document that mixes code, output and notes.
cellSingle executable block in a notebook.
markdownSimple text formatting used for notes in notebooks.
ColabCloud-based notebook service useful for Python and ML practice.
data science workflowdata science workflow is an important term in this topic.

Syntax / Basic Pattern

Basic idea: pehle data तैयार करें, phir Python logic apply करें, aur finally result display करें.

Basic Pattern
import pandas as pd
data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]}
df = pd.DataFrame(data)
df

Complete Example Program

Python – jupyter-colab.py
# In a notebook cell
import pandas as pd

data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]}
df = pd.DataFrame(data)
df

Expected Output

Name Marks 0 Aarav 85 1 Riya 92

Program Explanation

  • import pandas as pd imports ready-made features from a module/library.
  • data = {"Name": ["Aarav", "Riya"], "Marks": [85, 92]} stores a value in data.
  • df = pd.DataFrame(data) stores a value in df.
  • df performs the next step of the program logic.

Practical Uses

  • Writing code with notes.
  • Showing charts and outputs.
  • Sharing notebooks.

Common Mistakes

  • Analysing data before checking missing values, duplicates and data types.
  • Changing original data without keeping a clean copy.
  • Creating charts without title, labels or explanation.

Practice Tasks

  1. Program ko jupyter-colab.py file me type karke run karein.
  2. Values change karke output compare karein.
  3. writing code with notes par ek छोटा example banayen.
  4. Logic ko apne words me 5 lines me likhein.

सारांश

Jupyter Notebook and Google Colab ko tab complete maanenge jab aap iska meaning, example, output aur practical use clearly explain kar saken.

← Back to Python Tutorial