{"id":1438,"date":"2025-07-05T13:05:48","date_gmt":"2025-07-05T13:05:48","guid":{"rendered":"https:\/\/itxperts.co.in\/blog\/?p=1438"},"modified":"2025-07-05T13:06:17","modified_gmt":"2025-07-05T13:06:17","slug":"data-handling-using-pandas-class-12-informatics-practices-notes","status":"publish","type":"post","link":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/","title":{"rendered":"Data Handling Using Pandas | Class 12 Informatics Practices Notes"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udccc Introduction to Pandas<\/h2>\n\n\n\n<p>Pandas is a fast, powerful, flexible open-source data analysis and manipulation library built on top of Python. It is designed to work with structured data like tables (Excel, CSV, SQL, etc.).<\/p>\n\n\n\n<p><strong>Key Features:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Easy handling of missing data<\/li>\n\n\n\n<li>Automatic and explicit data alignment<\/li>\n\n\n\n<li>Powerful group-by functionality<\/li>\n\n\n\n<li>Time series functionality<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Importing Pandas<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>import pandas as pd\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> This imports pandas and assigns it the alias <code>pd<\/code>, which is a widely used convention.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddf0 Pandas Data Structures<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Series<\/h3>\n\n\n\n<p>A Series is a one-dimensional array with labels (indexes).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>import numpy as np\ns = pd.Series(&#91;10, 20, np.nan, 40])\nprint(s)\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>0    10.0\n1    20.0\n2     NaN\n3    40.0\ndtype: float64\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>NaN<\/code> indicates a missing value.<\/li>\n\n\n\n<li>Index is auto-generated (0,1,2,&#8230;).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. DataFrame<\/h3>\n\n\n\n<p>A DataFrame is a <strong><em>2D labeled<\/em><\/strong> data structure with columns of potentially different types.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>data = {\n    'Name': &#91;'Alice', 'Bob'],\n    'Age': &#91;25, 30]\n}\ndf = pd.DataFrame(data)\nprint(df)\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>    Name  Age\n0  Alice   25\n1    Bob   30\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Dictionary keys become column names.<\/li>\n\n\n\n<li>Values are inserted row-wise.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcaa Basic Operations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Viewing Data<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df.head())\nprint(df.tail())\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>    Name  Age\n0  Alice   25\n1    Bob   30\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.head()<\/code> shows the first 5 rows.<\/li>\n\n\n\n<li><code>.tail()<\/code> shows the last 5 rows.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Structure and Summary<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df.shape)\nprint(df.columns)\nprint(df.dtypes)\nprint(df.info())\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>(2, 2)\nIndex(&#91;'Name', 'Age'], dtype='object')\nName    object\nAge      int64\ndtype: object\n&lt;class 'pandas.core.frame.DataFrame'&gt;\nRangeIndex: 2 entries, 0 to 1\nData columns (total 2 columns):\n #   Column  Non-Null Count  Dtype \n---  ------  --------------  ----- \n 0   Name    2 non-null      object\n 1   Age     2 non-null      int64 \ndtypes: int64(1), object(1)\nmemory usage: 160.0 bytes\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.shape<\/code> returns dimensions.<\/li>\n\n\n\n<li><code>.columns<\/code> lists column names.<\/li>\n\n\n\n<li><code>.dtypes<\/code> shows data types.<\/li>\n\n\n\n<li><code>.info()<\/code> summarizes memory usage and null values.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd27 Data Selection<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Column Selection<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df&#91;'Name'])\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>0    Alice\n1      Bob\nName: Name, dtype: object\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Selects a single column as Series.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Row Selection<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df.loc&#91;0])\nprint(df.iloc&#91;1])\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>Name    Alice\nAge        25\nName: 0, dtype: object\n\nName     Bob\nAge        30\nName: 1, dtype: object\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.loc[]<\/code> uses label-based indexing.<\/li>\n\n\n\n<li><code>.iloc[]<\/code> uses integer position.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddf9 Data Cleaning<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Handling Missing Values<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>df = pd.DataFrame({'A': &#91;1, 2, np.nan], 'B': &#91;4, np.nan, 6]})\nprint(df.isnull())\nprint(df.fillna(0))\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>       A      B\n0  False  False\n1  False   True\n2   True  False\n\n     A    B\n0  1.0  4.0\n1  2.0  0.0\n2  0.0  6.0\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>isnull()<\/code> shows where values are missing.<\/li>\n\n\n\n<li><code>fillna(0)<\/code> replaces all missing values with 0.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd01 Sorting and Filtering<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Sorting<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df.sort_values(by='A'))\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Sorts the DataFrame based on column &#8216;A&#8217;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Filtering<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>print(df&#91;df&#91;'A'] &gt; 1])\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Returns rows where column &#8216;A&#8217; has values greater than 1.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcc8 Aggregation &amp; Statistical Functions in Pandas<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Sample DataFrame<\/h3>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code><code>import pandas as pd\n\ndf = pd.DataFrame({\n    'Employee': &#91;'Vikram', 'Alice', 'Bob', 'John', 'Priya'],\n    'Salary': &#91;90000, 80000, 60000, 60000, 80000],\n    'Experience': &#91;5, 4, 3, 3, 4]\n})\n<\/code><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. <code>max()<\/code> \u2013 Maximum value<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].max())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>90000<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Returns the highest salary in the column.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. <code>min()<\/code> \u2013 Minimum value<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].min())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>60000<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Returns the lowest salary.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. <code>count()<\/code> \u2013 Count of non-null values<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].count())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>5<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Counts the number of non-missing entries in the &#8216;Salary&#8217; column.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. <code>mean()<\/code> \u2013 Average value<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].mean())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>74000.0<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Returns the arithmetic mean of all salaries.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. <code>mode()<\/code> \u2013 Most frequent value(s)<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].mode())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>0    60000<br>1    80000<br>dtype: int64<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Shows modes; both 60000 and 80000 appear twice.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. <code>median()<\/code> \u2013 Middle value<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].median())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>80000.0<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Middle salary value when sorted.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. <code>std()<\/code> \u2013 Standard deviation<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].std())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>13038.40481<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Measures salary variation from the mean.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. <code>var()<\/code> \u2013 Variance<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df['Salary'].var())<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p><code>170000000.0<br><\/code><\/p>\n\n\n\n<p><strong>Explanation:<\/strong> Average squared deviation from the mean.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. <code>corr()<\/code> \u2013 Correlation matrix<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df.corr(numeric_only=True))<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>             Salary  Experience<br>Salary     1.000000    0.654654<br>Experience 0.654654    1.000000<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Measures how strongly salary and experience are related (1 = perfect positive).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">10. <code>cov()<\/code> \u2013 Covariance matrix<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>print(df.cov(numeric_only=True))<br><\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#eaeaea\"><code>           Salary  Experience<br>Salary     1.7e+08   65000.0<br>Experience 65000.0   0.5<br><\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Shows how salary and experience vary together.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcc6 Working with Dates<\/h2>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>dates = pd.date_range('2023-01-01', periods=3)\ndf = pd.DataFrame({'Date': dates, 'Visitors': &#91;100, 200, 300]})\ndf&#91;'Day'] = df&#91;'Date'].dt.day_name()\nprint(df)\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>        Date  Visitors      Day\n0 2023-01-01       100    Sunday\n1 2023-01-02       200    Monday\n2 2023-01-03       300   Tuesday\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Generates a range of dates and adds a column for day names.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd00 Merging and Joining<\/h2>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>founders = pd.DataFrame({\n    'Company': &#91;'Itxperts', 'TechNova'],\n    'Founder': &#91;'Vikram Singh Rawat', 'Sara Khan']\n})\n\nrevenue = pd.DataFrame({\n    'Company': &#91;'Itxperts', 'TechNova'],\n    'Revenue': &#91;5000000, 3000000]\n})\n\nresult = pd.merge(founders, revenue, on='Company')\nprint(result)\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>   Company            Founder  Revenue\n0  Itxperts  Vikram Singh Rawat  5000000\n1  TechNova            Sara Khan  3000000\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Merges two DataFrames using the common column &#8216;Company&#8217;.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd03 Pivot Tables<\/h2>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>data = pd.DataFrame({\n    'Company': &#91;'Itxperts', 'Itxperts', 'TechNova', 'TechNova'],\n    'Quarter': &#91;'Q1', 'Q2', 'Q1', 'Q2'],\n    'Profit': &#91;120000, 150000, 100000, 110000]\n})\n\npivot = data.pivot_table(values='Profit', index='Company', columns='Quarter')\nprint(pivot)\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>Quarter      Q1      Q2\nCompany                \nItxperts  120000  150000\nTechNova  100000  110000\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong> Creates a pivot table showing profits by quarter for each company.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcca Data Visualization (Requires matplotlib)<\/h2>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#eaeaea\"><code>import matplotlib.pyplot as plt\n\nsales = pd.DataFrame({\n    'Month': &#91;'Jan', 'Feb', 'Mar'],\n    'Itxperts': &#91;30000, 35000, 40000]\n})\n\nsales.plot(x='Month', y='Itxperts', kind='bar', title='Itxperts Monthly Sales')\nplt.ylabel('Revenue')\nplt.show()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"467\" src=\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/image.png\" alt=\"\" class=\"wp-image-1439\" srcset=\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/image.png 589w, https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/image-300x238.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/figure>\n\n\n\n<p><strong>Explanation:<\/strong> Plots a bar chart of monthly revenue for <strong>Itxperts.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcdd Practice Questions and Answers<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q1. Create a DataFrame for 5 employees of Itxperts with columns: Name, Age, Department, and Salary.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df = pd.DataFrame({\n    'Name': &#91;'Vikram Singh Rawat', 'Alice', 'Bob', 'John', 'Priya'],\n    'Age': &#91;35, 30, 28, 25, 26],\n    'Department': &#91;'Development', 'HR', 'Sales', 'Development', 'HR'],\n    'Salary': &#91;90000, 70000, 60000, 75000, 72000]\n})\nprint(df)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q2. Filter employees who earn more than \u20b970,000.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df&#91;df&#91;'Salary'] &gt; 70000])\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q3. Find the average salary of employees in each department.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df.groupby('Department')&#91;'Salary'].mean())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q4. Find the maximum and minimum salaries.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(\"Max Salary:\", df&#91;'Salary'].max())\nprint(\"Min Salary:\", df&#91;'Salary'].min())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q5. Find the most common (mode) salary.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df&#91;'Salary'].mode())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q6. Get a statistical summary of all numeric columns.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df.describe())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q7. Add a new column \u201cExperience\u201d and calculate correlation between Salary and Experience.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df&#91;'Experience'] = &#91;10, 7, 5, 6, 8]\nprint(df&#91;&#91;'Salary', 'Experience']].corr())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q8. Sort the DataFrame by Salary in descending order.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df.sort_values(by='Salary', ascending=False))\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q9. Replace department \u201cHR\u201d with \u201cHuman Resources\u201d.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df&#91;'Department'] = df&#91;'Department'].replace('HR', 'Human Resources')\nprint(df)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Q10. Save the DataFrame to a CSV file named &#8220;itxperts_employees.csv&#8221; without index.<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df.to_csv(\"itxperts_employees.csv\", index=False)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udfaf MCQs on Pandas<\/h2>\n\n\n\n<p><strong>Q1. Which of the following is NOT a core data structure in pandas?<\/strong><br>A. Series<br>B. DataFrame<br>C. Array<br>D. Panel<br>\u2705 <strong>Answer:<\/strong> C. Array<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Q2. What function is used to read a CSV file in pandas?<\/strong><br>A. read_table()<br>B. read_file()<br>C. read_csv()<br>D. open_csv()<br>\u2705 <strong>Answer:<\/strong> C. read_csv()<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Q3. Which function returns the number of non-null values in a DataFrame column?<\/strong><br>A. sum()<br>B. count()<br>C. len()<br>D. value_counts()<br>\u2705 <strong>Answer:<\/strong> B. count()<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Q4. What does the <code>describe()<\/code> function do?<\/strong><br>A. Shows null values<br>B. Sorts the data<br>C. Provides summary statistics<br>D. Removes duplicates<br>\u2705 <strong>Answer:<\/strong> C. Provides summary statistics<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Q5. Which of the following is used to calculate correlation between two columns?<\/strong><br>A. .cov()<br>B. .corr()<br>C. .mean()<br>D. .std()<br>\u2705 <strong>Answer:<\/strong> B. .corr()<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddea Mini Project: Itxperts Performance Analysis<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Create DataFrame<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df = pd.DataFrame({\n    'Name': &#91;'Vikram', 'Alice', 'Bob', 'John', 'Priya'],\n    'Department': &#91;'AI\/ML', 'Web', 'Sales', 'Web', 'HR'],\n    'Score': &#91;92, 88, 75, 80, 70],\n    'Experience': &#91;10, 7, 5, 6, 4]\n})\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Find department-wise average score<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>print(df.groupby('Department')&#91;'Score'].mean())\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add a column for performance rating<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>def get_rating(score):\n    if score &gt;= 90:\n        return 'Excellent'\n    elif score &gt;= 80:\n        return 'Good'\n    elif score &gt;= 70:\n        return 'Average'\n    else:\n        return 'Needs Improvement'\n\ndf&#91;'Rating'] = df&#91;'Score'].apply(get_rating)\nprint(df)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Export top performers (score &gt; 85)<\/h3>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>top_performers = df&#91;df&#91;'Score'] &gt; 85]\ntop_performers.to_csv('top_performers.csv', index=False)\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Important Pandas Questions for CBSE Class 12 Board Exams<\/h2>\n\n\n\n<p><strong>50 Important Questions<\/strong> on <strong>Pandas (Python \u2013 Data Handling using Pandas)<\/strong> that can be asked in <strong>CBSE Class 12 Informatics Practices \/ Computer Science Board Exams<\/strong> \u2013 covering 1-mark, 2-mark, and 3\/4-mark types:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>1-Mark Questions (Definition \/ MCQ Type)<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>What is Pandas in Python?<\/li>\n\n\n\n<li>What are the two main data structures of Pandas?<\/li>\n\n\n\n<li>What is a Series in Pandas?<\/li>\n\n\n\n<li>What is a DataFrame?<\/li>\n\n\n\n<li>Which method is used to read a CSV file in Pandas?<\/li>\n\n\n\n<li>Which method returns the first 5 rows of a DataFrame?<\/li>\n\n\n\n<li>Which attribute returns the number of rows and columns in a DataFrame?<\/li>\n\n\n\n<li>Which function gives the statistical summary of a DataFrame?<\/li>\n\n\n\n<li>What is the default indexing in a Pandas Series?<\/li>\n\n\n\n<li>What does <code>df.dtypes<\/code> return?<\/li>\n\n\n\n<li>Which function is used to write a DataFrame into a CSV file?<\/li>\n\n\n\n<li>What is the difference between <code>loc[]<\/code> and <code>iloc[]<\/code>?<\/li>\n\n\n\n<li>Which function is used to find null values in a DataFrame?<\/li>\n\n\n\n<li>Which Pandas function is used to find the correlation between columns?<\/li>\n\n\n\n<li>What is the output type of <code>df['ColumnName']<\/code>?<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>2-Mark Questions (Short Answer)<\/strong><\/h3>\n\n\n\n<ol start=\"16\" class=\"wp-block-list\">\n<li>Write two differences between Series and DataFrame.<\/li>\n\n\n\n<li>How is missing data represented in Pandas?<\/li>\n\n\n\n<li>How can you rename a column in a DataFrame?<\/li>\n\n\n\n<li>What is the use of <code>dropna()<\/code> and <code>fillna()<\/code> in Pandas?<\/li>\n\n\n\n<li>Write a statement to sort a DataFrame by the column \u201cAge\u201d in descending order.<\/li>\n\n\n\n<li>How can you filter rows where salary is more than \u20b950,000?<\/li>\n\n\n\n<li>Write a code to create a Series from a dictionary.<\/li>\n\n\n\n<li>Write a Python statement to calculate the mean of column \u201cMarks\u201d.<\/li>\n\n\n\n<li>Write a code to read an Excel file using Pandas.<\/li>\n\n\n\n<li>What is the purpose of the <code>groupby()<\/code> function?<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>3\/4-Mark Questions (Application-Based \/ Coding)<\/strong><\/h3>\n\n\n\n<ol start=\"26\" class=\"wp-block-list\">\n<li>Write a Python program to create a DataFrame with columns: Name, Age, and Marks.<\/li>\n\n\n\n<li>Write code to:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Read a CSV file named <code>students.csv<\/code><\/li>\n\n\n\n<li>Display first 3 rows<\/li>\n<\/ul>\n\n\n\n<ol start=\"28\" class=\"wp-block-list\">\n<li>Write a code to drop the column \u201cEmail\u201d from the DataFrame <code>df<\/code>.<\/li>\n\n\n\n<li>Given a DataFrame <code>df<\/code>, write a code to count total null values in each column.<\/li>\n\n\n\n<li>Create a DataFrame of 3 students and add a new column \u201cResult\u201d based on Marks.<\/li>\n\n\n\n<li>Write a code to sort a DataFrame first by \u201cClass\u201d and then by \u201cMarks\u201d.<\/li>\n\n\n\n<li>Create a Series of your 5 favorite fruits and print the first and last two elements.<\/li>\n\n\n\n<li>How can you perform aggregation to find total salary department-wise?<\/li>\n\n\n\n<li>Write a code to merge two DataFrames <code>df1<\/code> and <code>df2<\/code> based on \u201cEmpID\u201d.<\/li>\n\n\n\n<li>How is <code>value_counts()<\/code> useful in analyzing data?<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>Case-Based \/ Real Application Questions<\/strong><\/h3>\n\n\n\n<ol start=\"36\" class=\"wp-block-list\">\n<li>Create a DataFrame of ITxperts employees with name, department, and experience. Display those with more than 5 years of experience.<\/li>\n\n\n\n<li>From a CSV file \u201csales.csv\u201d, read the data and show maximum, minimum, and average monthly sales.<\/li>\n\n\n\n<li>Write a code to replace all NaN values in the \u201cMarks\u201d column with 0.<\/li>\n\n\n\n<li>Explain the use of <code>apply()<\/code> function with an example.<\/li>\n\n\n\n<li>Write a Python function to classify students as \u201cPass\u201d or \u201cFail\u201d based on Marks using <code>apply()<\/code>.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>Output Prediction \/ Error Finding<\/strong><\/h3>\n\n\n\n<ol start=\"41\" class=\"wp-block-list\">\n<li>Predict the output of:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>import pandas as pd  \ns = pd.Series(&#91;10, 20, 30], index=&#91;'a', 'b', 'c'])  \nprint(s&#91;'b'])\n<\/code><\/pre>\n\n\n\n<ol start=\"42\" class=\"wp-block-list\">\n<li>Predict the output of:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df = pd.DataFrame({'X': &#91;1, 2], 'Y': &#91;3, 4]})  \nprint(df.loc&#91;1])\n<\/code><\/pre>\n\n\n\n<ol start=\"43\" class=\"wp-block-list\">\n<li>Find the error:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df = pd.DataFrame()  \nprint(df.head(10))  \ndf.sort('Salary')\n<\/code><\/pre>\n\n\n\n<ol start=\"44\" class=\"wp-block-list\">\n<li>What will be the output if:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>df = pd.DataFrame({'A': &#91;1, 2, 3], 'B': &#91;4, 5, 6]})  \nprint(df.mean())\n<\/code><\/pre>\n\n\n\n<ol start=\"45\" class=\"wp-block-list\">\n<li>What will <code>df.describe(include='all')<\/code> return?<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>Conceptual \/ Reasoning-Based<\/strong><\/h3>\n\n\n\n<ol start=\"46\" class=\"wp-block-list\">\n<li>Why is Pandas preferred for data analysis in Python?<\/li>\n\n\n\n<li>What happens if the index values in a Series are not unique?<\/li>\n\n\n\n<li>Differentiate between <code>append()<\/code> and <code>concat()<\/code> in Pandas.<\/li>\n\n\n\n<li>Can a DataFrame have columns of different data types? Justify.<\/li>\n\n\n\n<li>How is Pandas useful for handling real-world tabular data?<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>Explore comprehensive Class 12 Informatics Practices notes for Chapter 2: Data Handling Using Pandas \u2013 I. Understand Series, DataFrames, and data manipulation techniques with easy examples and Python code. Ideal for CBSE board exam preparation.<\/p>\n","protected":false},"author":1,"featured_media":1440,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"googlesitekit_rrm_CAow44u0DA:productID":"","footnotes":""},"categories":[44],"tags":[202,153],"class_list":["post-1438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-tutorials","tag-dataframe","tag-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts\" \/>\n<meta property=\"og:description\" content=\"Explore comprehensive Class 12 Informatics Practices notes for Chapter 2: Data Handling Using Pandas \u2013 I. Understand Series, DataFrames, and data manipulation techniques with easy examples and Python code. Ideal for CBSE board exam preparation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\" \/>\n<meta property=\"og:site_name\" content=\"Itxperts\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/itxperts.co.in\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-05T13:05:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-05T13:06:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"@mritxperts\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"@mritxperts\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\"},\"author\":{\"name\":\"@mritxperts\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6\"},\"headline\":\"Data Handling Using Pandas | Class 12 Informatics Practices Notes\",\"datePublished\":\"2025-07-05T13:05:48+00:00\",\"dateModified\":\"2025-07-05T13:06:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\"},\"wordCount\":1184,\"publisher\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png\",\"keywords\":[\"DataFrame\",\"Python\"],\"articleSection\":[\"Learn Python\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\",\"url\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\",\"name\":\"Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts\",\"isPartOf\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png\",\"datePublished\":\"2025-07-05T13:05:48+00:00\",\"dateModified\":\"2025-07-05T13:06:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage\",\"url\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png\",\"contentUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itxperts.co.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Handling Using Pandas | Class 12 Informatics Practices Notes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#website\",\"url\":\"https:\/\/itxperts.co.in\/blog\/\",\"name\":\"Itxperts\",\"description\":\"Leading Website Design Company in Madhya Pradesh\",\"publisher\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\"},\"alternateName\":\"Itxperts | Website Development in Madhya Pradesh\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itxperts.co.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\",\"name\":\"Itxperts\",\"alternateName\":\"Leading Website Design Company in Madhya Pradesh \u2013 Itxperts\",\"url\":\"https:\/\/itxperts.co.in\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png\",\"contentUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png\",\"width\":512,\"height\":512,\"caption\":\"Itxperts\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/itxperts.co.in\",\"https:\/\/www.linkedin.com\/company\/itxpertsshivpuri\/\",\"https:\/\/www.instagram.com\/itxperts.co.in\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6\",\"name\":\"@mritxperts\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g\",\"caption\":\"@mritxperts\"},\"description\":\"I am a full-stack web developer from India with over 8 years of experience in building dynamic and responsive web solutions. Specializing in both front-end and back-end development, I have a passion for creating seamless digital experiences. When I'm not coding, I enjoy sharing insights and tutorials on the latest web technologies, helping fellow developers stay ahead in the ever-evolving tech landscape.\",\"sameAs\":[\"https:\/\/itxperts.co.in\/blog\"],\"url\":\"https:\/\/itxperts.co.in\/blog\/author\/mritxpertsgmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/","og_locale":"en_US","og_type":"article","og_title":"Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts","og_description":"Explore comprehensive Class 12 Informatics Practices notes for Chapter 2: Data Handling Using Pandas \u2013 I. Understand Series, DataFrames, and data manipulation techniques with easy examples and Python code. Ideal for CBSE board exam preparation.","og_url":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/","og_site_name":"Itxperts","article_publisher":"https:\/\/www.facebook.com\/itxperts.co.in","article_published_time":"2025-07-05T13:05:48+00:00","article_modified_time":"2025-07-05T13:06:17+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png","type":"image\/png"}],"author":"@mritxperts","twitter_card":"summary_large_image","twitter_misc":{"Written by":"@mritxperts","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#article","isPartOf":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/"},"author":{"name":"@mritxperts","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6"},"headline":"Data Handling Using Pandas | Class 12 Informatics Practices Notes","datePublished":"2025-07-05T13:05:48+00:00","dateModified":"2025-07-05T13:06:17+00:00","mainEntityOfPage":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/"},"wordCount":1184,"publisher":{"@id":"https:\/\/itxperts.co.in\/blog\/#organization"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage"},"thumbnailUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png","keywords":["DataFrame","Python"],"articleSection":["Learn Python"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/","url":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/","name":"Data Handling Using Pandas | Class 12 Informatics Practices Notes - Itxperts","isPartOf":{"@id":"https:\/\/itxperts.co.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage"},"thumbnailUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png","datePublished":"2025-07-05T13:05:48+00:00","dateModified":"2025-07-05T13:06:17+00:00","breadcrumb":{"@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#primaryimage","url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png","contentUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/07\/ip-notes.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/itxperts.co.in\/blog\/data-handling-using-pandas-class-12-informatics-practices-notes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itxperts.co.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Data Handling Using Pandas | Class 12 Informatics Practices Notes"}]},{"@type":"WebSite","@id":"https:\/\/itxperts.co.in\/blog\/#website","url":"https:\/\/itxperts.co.in\/blog\/","name":"Itxperts","description":"Leading Website Design Company in Madhya Pradesh","publisher":{"@id":"https:\/\/itxperts.co.in\/blog\/#organization"},"alternateName":"Itxperts | Website Development in Madhya Pradesh","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itxperts.co.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itxperts.co.in\/blog\/#organization","name":"Itxperts","alternateName":"Leading Website Design Company in Madhya Pradesh \u2013 Itxperts","url":"https:\/\/itxperts.co.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png","contentUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png","width":512,"height":512,"caption":"Itxperts"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/itxperts.co.in","https:\/\/www.linkedin.com\/company\/itxpertsshivpuri\/","https:\/\/www.instagram.com\/itxperts.co.in\/"]},{"@type":"Person","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6","name":"@mritxperts","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g","caption":"@mritxperts"},"description":"I am a full-stack web developer from India with over 8 years of experience in building dynamic and responsive web solutions. Specializing in both front-end and back-end development, I have a passion for creating seamless digital experiences. When I'm not coding, I enjoy sharing insights and tutorials on the latest web technologies, helping fellow developers stay ahead in the ever-evolving tech landscape.","sameAs":["https:\/\/itxperts.co.in\/blog"],"url":"https:\/\/itxperts.co.in\/blog\/author\/mritxpertsgmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/comments?post=1438"}],"version-history":[{"count":1,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions"}],"predecessor-version":[{"id":1441,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions\/1441"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/media\/1440"}],"wp:attachment":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/media?parent=1438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/categories?post=1438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/tags?post=1438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}