0% found this document useful (0 votes)
4 views2 pages

py

The document provides an overview of various data structures in Python including lists, tuples, and sets, along with their characteristics and operations. It also introduces the Pandas library for data manipulation and analysis, highlighting its key features such as data structures and efficient data operations. Additionally, it covers Tkinter for creating graphical user interfaces, emphasizing its simplicity and cross-platform capabilities.

Uploaded by

parthjadhav0669
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

py

The document provides an overview of various data structures in Python including lists, tuples, and sets, along with their characteristics and operations. It also introduces the Pandas library for data manipulation and analysis, highlighting its key features such as data structures and efficient data operations. Additionally, it covers Tkinter for creating graphical user interfaces, emphasizing its simplicity and cross-platform capabilities.

Uploaded by

parthjadhav0669
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

list

A list in Python is a mutable, ordered collection of elements. It can store items of di erent data
types — like integers, strings, or even other lists.

# 1) Create a List
my_list = [10, 20, 30, 40, 50]
print("Original List:", my_list)

# 2) Access Elements of List


print("Access element at index 2:", my_list[2]) # Output: 30

# 3) Update a List Element


my_list[1] = 25
print("Updated List after changing index 1:", my_list)

# 4) Delete an Element from List


del my_list[3] # Removes element at index 3 (value 40)
print("List after deletion at index 3:", my_list)

tuple
A tuple is a built-in data structure in Python that stores multiple items in a single variable. It is:
• Ordered (items have a de ned position)
• Immutable (cannot be changed after creation)
• Allows duplicate values
• Can contain elements of di erent data types

sets
1⃣ Union (set1.union(set2))
• Meaning: Combines all unique elements from both sets.
• ✅ Duplicates are removed automatically.

2⃣ Intersection (set1.intersection(set2))
• Meaning: Gives only the elements that are common in both sets.

3⃣ Di erence (set1.di erence(set2))


• Meaning: Gives the elements that are in set1 but NOT in set2.
• Think of it like: “What’s extra in set1 that set2 doesn’t have?”

4⃣ Symmetric Di erence (set1.symmetric_di erence(set2))


• Meaning: Gives elements that are in either of the sets but not in both.
• Removes common elements and combines the rest.

lambda
👉 A lambda is just a shortcut way to write a small function in one line — without giving it a
name.

pandas
Pandas is a popular open-source library in Python used for data manipulation and analysis. It
provides data structures and functions needed to e ciently work with structured data, such as
ff
ff
ff
fi
ff
ff
ffi
ff
tables (like spreadsheets or SQL tables). Pandas is widely used for tasks like data cleaning,
transformation, and exploration.

Key Features of Pandas:


1. Data Structures: Pandas provides two main data structures:
• Series: A one-dimensional labeled array that can hold any data type (integers,
strings, oats, etc.).
• DataFrame: A two-dimensional, size-mutable, and potentially heterogeneous
tabular data structure with labeled axes (rows and columns). It’s like a table or a spreadsheet in
Python.
2. Data Handling: Pandas provides tools for reading, writing, and manipulating data.
For example:
• Reading data from CSV, Excel, SQL databases, and more.
• Cleaning data, lling missing values, or removing duplicates.
• Merging and joining data from multiple sources.
3. E cient Data Operations: It allows performing operations like ltering, grouping,
aggregating, and reshaping data e ciently.
4. Time Series Support: Pandas has extensive support for time series data, which
makes it suitable for nancial analysis, stock market data analysis, etc.
tkinter
Tkinter is a built-in Python library used for creating graphical user interfaces (GUIs). It provides a
way to create windows, buttons, textboxes, labels, and many other interactive elements in a
Python application. Tkinter is simple and widely used for desktop applications because it is
included in the standard Python distribution and doesn’t require additional installation.

Key Features of Tkinter:


1. Simple and Lightweight: Tkinter is a simple, lightweight library that is easy to use
and doesn’t require complex setup.
2. Cross-Platform: Tkinter works on various platforms like Windows, macOS, and
Linux.
3. Widgets: Tkinter provides several widgets (components) for building the interface,
including:
• Label: To display text or images.
• Button: To create clickable buttons.
• Entry: For single-line text input elds.
• Text: For multi-line text input elds.
• Frame: A container for organizing other widgets.
• Canvas: For drawing graphics.
• Checkbutton: For creating checkboxes.
• Radiobutton: For creating radio buttons.
4. Event-Driven: Tkinter is event-driven, meaning that it reacts to user actions (e.g.,
button clicks, key presses).
fl
ffi
fi
fi
ffi
fi
fi
fi

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy