Pular para o conteúdo

CBSE Class 12 Informatics Practices

Class 12 · CBSEComputer Science32 notas em 4 pastas, 163 KB

32 notas de revisão de CBSE Class 12 Computer Science, criadas por cookie, em 4 seções que seguem os tópicos do curso.

Notes for CBSE Class 12 Informatics Practices (065), in folders for the curriculum's four units in order: data handling with Pandas and Matplotlib, SQL queries, computer networks and societal impacts. Code is in Python and MySQL, with worked examples. Follows the 2026-27 curriculum. The project and practical file are not covered. Delete any folder your course leaves out once the notes are yours.

Ao adicioná-las, você coloca uma cópia nas suas anotações, em uma pasta própria com as pastas abaixo. Você pode alterá-las e transformá-las em cartões de estudo ou em um conjunto de questões. Ao baixar, você recebe um arquivo zip com arquivos Markdown, que podem ser abertos em qualquer aplicativo de anotações.

O que contém

  • Data handling using Pandas and data visualisation
    • Pandas, NumPy and Matplotlib3 KB
    • Creating a Series, its attributes and arithmetic7 KB
    • Selecting, indexing and slicing a Series3 KB
    • Creating a DataFrame, its attributes and iteration7 KB
    • Rows, columns and indexing a DataFrame8 KB
    • CSV files: importing and exporting4 KB
    • Summarising data: sorting, duplicates, quantiles and grouping4 KB
    • Line plots, labels, legends and saving plots7 KB
    • Bar graphs and histograms5 KB
  • Database query using SQL
    • Database concepts, keys and the kinds of SQL statement5 KB
    • Creating databases and tables, data types, constraints, ALTER and DROP5 KB
    • INSERT, UPDATE and DELETE4 KB
    • SELECT queries: WHERE, operators, LIKE, NULL and DISTINCT6 KB
    • Math functions: POWER, ROUND and MOD4 KB
    • Text functions4 KB
    • Date functions4 KB
    • Aggregate functions and COUNT4 KB
    • GROUP BY, HAVING and ORDER BY4 KB
    • Working with two tables: Cartesian product and equi-join5 KB
  • Introduction to computer networks
    • Networks and their types: PAN, LAN, MAN and WAN5 KB
    • Network devices5 KB
    • Network topologies4 KB
    • The internet, URL, WWW, email, chat and VoIP5 KB
    • Websites, web pages, web servers and hosting5 KB
    • Web browsers, settings, add-ons, plug-ins and cookies5 KB
  • Societal impacts
    • Digital footprint, net and communication etiquette5 KB
    • Data protection and privacy5 KB
    • Intellectual property, plagiarism, copyright and licensing7 KB
    • Free and open source software4 KB
    • Cybercrime and the Indian IT Act7 KB
    • E-waste: hazards and management5 KB
    • Technology and health, gender and disability7 KB

A primeira anotação

Data handling using Pandas and data visualisation / Pandas, NumPy and Matplotlib

Python's standard library handles numbers, text and lists, but it has nothing for working with a table of data or for drawing a chart. Two third-party libraries fill those gaps, and a third sits underneath one of them.

LibraryWhat it is forUsual import
PandasHolding and analysing labelled data in one dimension (Series) or two (DataFrame)import pandas as pd
NumPyFast arrays of numbers, which Pandas is built onimport numpy as np
MatplotlibDrawing line plots, bar graphs, histograms and other chartsimport matplotlib.pyplot as plt

The names pd, np and plt are aliases. They are conventions, not requirements, but every example in this course uses them, and code written with a different alias must use that alias everywhere. A library has to be installed once on the computer (with pip install pandas) and imported in every program that uses it.

Pandas

Pandas (the name comes from "panel data") reads data from files such as CSV, keeps it in labelled structures, and offers operations that would take many lines of plain Python: selecting rows by a condition, adding columns, grouping and summarising, and handing the result to Matplotlib for plotting.

It has two main data structures.

  • A Series is a one-dimensional labelled array. It holds values of one data type and has an index that labels each value.
  • A DataFrame is a two-dimensional labelled structure, a table with rows and columns. Each column behaves like a Series, and the columns can have different data types.

NumPy arrays

NumPy's central object is the ndarray, an n-dimensional array. Unlike a Python list, every element of an ndarray has the same data type, and arithmetic is applied to the whole array at once.

import numpy as np

a = np.array([10, 20, 30, 40])
print(a)          # [10 20 30 40]
print(a * 2)      # [20 40 60 80]
print(a + 5)      # [15 25 35 45]
print(a.dtype)    # int64 on most systems

A list does not behave this way, because [10, 20] * 2 repeats the list and [10, 20] + 5 is an error. The array is created from a list (or a tuple) with np.array(), and if the list mixes integers and floats every element is converted to float, because the array has one data type.

b = np.array([1, 2.5, 3])
print(b)          # [1.  2.5 3. ]

An ndarray is one of the forms of data from which a Pandas Series can be built, which is why it matters here.

Matplotlib

Matplotlib is a plotting library, and its pyplot module provides functions in the style of a drawing program: each call adds something to the current figure, and plt.show() displays it. Line plots, bar graphs and histograms are drawn with plt.plot(), plt.bar() and plt.hist(), and labels, a title and a legend are added with further calls. Pandas also has plotting methods of its own, which use Matplotlib underneath.

Importing in a program

A typical data-handling program starts with the imports and then works through read, process and plot.

import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv("marks.csv")
print(df.head())
df["Maths"].plot(kind="bar")
plt.show()

Two forms of import are accepted, and they differ in how names are written afterwards. import pandas as pd means every Pandas name is written pd.Series, pd.DataFrame and so on. from pandas import Series brings one name in directly, so it is written Series(...) with no prefix. The aliased form is the one to use, because it shows at a glance where each name comes from.

E mais 31 depois que você adicionar ou baixar.

Avaliações

Ainda não há avaliações escritas. Adicione estas notas às suas e você poderá ser a primeira pessoa a deixar uma avaliação.