WORKING WITH EXCEL FILE
USING PANDAS
By Zeeshan Hussain (Software Engineer)
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
WHAT IS PANDA ?
• Pandas is an open-source data manipulation and analysis library.
• Pandas is particularly well-suited for working with tabular data such
as spreadsheets and relational databases.
• Key features of the Pandas library include:
• Data Structures
• Data Manipulation
• Missing Data Handling
• Time Series Analysis
• I/O Tools
• Powerful Data Analysis
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
READ AN EXCEL FILE
• To read an Excel file using Pandas in Visual Studio Code (VS Code),
you'll first need to ensure that you have Pandas installed in your
Python environment within VS Code.
• You can install Pandas via pip if you haven't already:
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
READ A SPECIFIED NUMBER OF RECORDS
• To read a specified number of rows from an Excel file using Pandas in
VS Code, you can use the pd.read_excel() function along with the
nrows parameter to specify the number of rows to read.
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
READ SPECIFIC RECORD
• To Access the specific row using Data Frame indexing.
• Remember that Data Frame indexing is zero-based, so the first row is
at index 0:
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
WRITE DATA INTO EXCEL
• To write data into an existing Excel file using Pandas, you can use the
pandas Data Frame with concat() method.
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
WHAT IS LIBRARY ?
• A Python library refers to a collection of pre-written Python code that
provides reusable functions, classes, and modules to facilitate specific
tasks or solve particular problems.
• These libraries aim to simplify development by offering ready-made
solutions for common programming challenges.
• Examples:
• NumPy, Matplotlib, Tkinter, Django, Kotlin, Micropython, PyGame.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
NUMPY LIBRARY
• NumPy, short for "Numerical Python," is a powerful library in Python
used for numerical computing.
• It provides support for large, multi-dimensional arrays and matrices,
along with a collection of mathematical functions to operate on these
arrays efficiently.
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
MATPLOTLIB LIBRARY
• Matplotlib is a Python library for making all kinds of plots (Plots are
visual ways to show data patterns, like line graphs or bar charts. They
help understand information quickly by presenting it visually.) and
charts easily.
• It helps you visualize data in 2D and 3D, with lots of customization
options to make your plots look just the way you want them.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
TKINTER LIBRARY
• Tkinter is a built-in Python library for making graphical user interfaces
(GUIs). It's easy to use and comes with tools for creating windows,
buttons, labels, and more.
• Tkinter is based on the Tk GUI toolkit and is commonly used for
desktop application development in Python. It's suitable for both
beginners and experienced developers.
• Example:
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
DJANGO LIBRARY
• Django is a Python web framework for building websites fast. It helps
manage things like URLs, databases, user authentication, and
templates.
• Django follows the "Don't Repeat Yourself" principle, making it easy
to write clean code. It's known for scalability, security, and an admin
interface, making it popular for creating powerful web applications.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
KOTLIN
• Kotlin is a flexible programming language used for building apps and
programs.
• Kotlin libraries are ready-made sets of code that add extra features to
Kotlin projects, like working with databases or designing user
interfaces.
• They help developers save time and effort by providing solutions to
common tasks.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
MICRO PYTHON
• Micro Python is a lightweight version of Python designed for
microcontrollers and embedded systems.
• It lets developers write Python code for small devices, like
microcontrollers, enabling fast development of IoT projects.
• Micro Python includes a subset of Python's standard features and is
optimized for efficient execution on resource-constrained devices,
making it perfect for IoT applications.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
PYGAME LIBRARY
• Pygame is a Python library for making video games.
• It provides tools for handling graphics, sound, and user input, making
it easy to create 2D games and multimedia applications.
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
IF ANY QUESTION, YOU CAN
ASK!
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain
THANK YOU!
Portfolio: [Link] | WhatsApp: +923181482800 | Lecturer: Zeeshan Hussain