🔵 Data Science · Lesson 34
Jupyter Notebook और Google Colab
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
| Term | Meaning |
|---|---|
| notebook | Interactive document that mixes code, output and notes. |
| cell | Single executable block in a notebook. |
| markdown | Simple text formatting used for notes in notebooks. |
| Colab | Cloud-based notebook service useful for Python and ML practice. |
| data science workflow | data 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)
dfComplete 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)
dfExpected Output
Name Marks
0 Aarav 85
1 Riya 92
Program Explanation
import pandas as pdimports 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.dfperforms 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
- Program ko
jupyter-colab.pyfile me type karke run karein. - Values change karke output compare karein.
- writing code with notes par ek छोटा example banayen.
- 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.