Intershipp Report Python
Intershipp Report Python
On
Python
(SESSON 2022-2023)
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
CHAMELI DEVI GROUP OF INSTITUTIONS, INDORE
Submitted by:
Faizan Siddiqui (0832CS201045)
Submitted to:
Prof. Shreyas Pagare
Faizan Siddiqui
0832CS201045
VI Semester
2
CHAMELI DEVI GROUP OF INSTITUTIONS,
INDORE
CERTIFICATE
This is to certify that Mr./Ms. Faizan Siddiqui of B.Tech (Computer Science &
Engineering) Enrollment No. 0832CS201045 has completed/partially completed
his/her Internship of two-weeks from date 16/01/2023 to 30/01/2023 at Chameli
Devi Group Of Institutions during the Academic Year 2022-2023 as partial
fulfillment of the B.Tech (Computer Science & Engineering) course.
3
Certificate
4
Table of Content
Table of Content........................................................................................................................1
1.0 Introduction...................................................................................................................3
5
1.0 Introduction
Python is a widely used general-purpose, high level programming language. It was created by
Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was
designed with an emphasis on code readability, and its syntax allows programmers to express
their concepts in fewer lines of code.
Often, programmers fall in love with Python because of the increased productivity it provides.
Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debug Python
programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the
interpreter discovers an error, it raises an exception. When the program doesn't catch the except,
-ion the interpreter prints a stack trace.
A source level debugger allows inspection of local and global variables, evaluation of arbitrary
expressions, setting breakpoints, stepping through the code a line at a time, and so on. The
debugger is written in Python itself, testifying to Python's introspective power. On the other
hand, often the quickest way to debug a program is to add a few print statements to the source:
the fast edit-test-debug cycle makes this simple approach very effective.
6
2.1 Declaration
We certify that the work contained in this report is original and has been done by
us under the guidance of my supervisor(s).
a. The work has not been submitted to any other Institute for any degree or
diploma.
b. We have followed the guidelines provided by the Institute in preparing the
report.
c. We have conformed to the norms and guidelines given in the Ethical Code of
Conduct of the Institute.
Whenever we have used materials (data, theoretical analysis, figures, and text)
from other sources, we have given due credit to them by citing them in the text
of the report and giving their details in the references.
2.2 Abstract
The internship report documents my experience as an intern, where I worked on
Projects using python. I use various python libraries such as numpy, pandas, matplotlib,
skicit learn etc. and working on various datasets and plot graphs using matplotlib. I have
gained a lot of experience after working in this internship. Through this internship I have
gained valuable experience on Machine learning and learned how to effectively utilize
python frameworks in creating interactive application. This report contains a detailed
description of the projects, including the methodology used. Technology is an enriching
experience that allowed me to apply my skills and knowledge in a practical setting an
provided me with a solid foundation for future work.
7
2.3 Table of Contents
1. Introduction:
• Overview of Python Programming Language
• Purposes of internship
• Objectives
2. Background:
• Python Overview
• Python Functions
• Python Libraries
3. Project Description:
• Project Overview
• Problem Statement
• Objectives
• Scope
• Project Methodology
4. Python Libraries:
• Numpy
• Pandas
• Matplotlib
• Array
Week 1:
• Introduction to Python
• Features and future scope of Python
• Data types in Python
• Functions in Python
• Creating custom modulus in python
• Overview of Machine Learning
Week 2:
8
2.5 Text (Body of the Internship Report)
Chapter 1: Introduction to Python Programming Language
Python is a widely used general-purpose, high level programming language. It was created by
Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was
designed with an emphasis on code readability, and its syntax allows programmers to express
their concepts in fewer lines of code.
Often, programmers fall in love with Python because of the increased productivity it
provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast.
Debug Python programs is easy: a bug or bad input will never cause a segmentation fault.
Instead, when the interpreter discovers an error, it raises an exception. When the program
doesn't catch the except, -ion the interpreter prints a stack trace.
A source level debugger allows inspection of local and global variables, evaluation of arbitrary
expressions, setting breakpoints, stepping through the code a line at a time, and so on. The
debugger is written in Python itself, testifying to Python's introspective power. On the other
hand, often the quickest way to debug a program is to add a few print statements to the source:
the fast edit-test-debug cycle makes this simple approach very effective.
9
Chapter 2: Creating Custom Modules and Introduction to Functions
What is a Module?
Consider a module to be the same as a code library. A file containing a set of functions you
want to include in your application.
To create a module just save the code you want in a file with the file extension (.py).
Example:
Use a Module
Now we can use the module we just created, by using the import statement:
Example:
Import the module named mymodule, and call the greeting function:
import mymodule
mymodule.greeting(“Shivam”)
Functions in Python:
A function is a block of code which only runs when it is called. You can pass data,
known as parameters, into a function. A function can return data as a result.
Creating a Function:
10
Chapter 3: Introdution to Numpy in Python
What is NumPy?
NumPy is a Python library used for working with arrays. It also has functions for
working in domain of linear algebra, fourier transform, and matrices. NumPy was
created in 2005 by Travis Oliphant. It is an open source project and you can use it
freely. NumPy stands for Numerical Python.
Why Use NumPy?
In Python we have lists that serve the purpose of arrays, but they are slow to process.
NumPy aims to provide an array object that is up to 50x faster than traditional Python
lists. The array object in NumPy is called ndarray, it provides a lot of supporting
functions that make working with ndarray very easy. Arrays are very frequently used in
data science, where speed and resources are very important.
Why is NumPy Faster Than Lists?
NumPy arrays are stored at one continuous place in memory unlike lists, so processes
can access and manipulate them very efficiently. This behavior is called locality of
reference in computer science. This is the main reason why NumPy is faster than lists.
Also it is optimized to work with latest CPU architectures.
Which Language is NumPy written in?
NumPy is a Python library and is written partially in Python, but most of the parts that
require fast computation are written in C or C++.
Import NumPy
Once NumPy is installed, import it in your applications by adding the import keyword.
Example:
import numpy
11
Chapter 4: Introduction Pandas in Python
What is Pandas?
Pandas is a Python library used for working with data sets. It has functions for
analyzing, cleaning, exploring, and manipulating data. The name "Pandas" has a
reference to both "Panel Data", and "Python Data Analysis" and was created by Wes
McKinney in 2008.
Pandas allows us to analyze big data and make conclusions based on statistical theories.
Pandas can clean messy data sets, and make them readable and relevant.
Relevant data is very important in data science.
mydataset = {
‘cars’: [“BMW, “Volvo”, “Ford”],
‘passings’: [3,7,2]
}
myvar = pandas.DataFrame(mydataset)
print(myvar)
12
Chapter 5: Introduction to Mtplotlib in Python
Example:
#X-axis values
x = [5, 2, 9, 4, 7]
#Y-axis values
y = [10, 5 , 8, 4, 2]
#Function to plot
plt.plot(x,y)
plt.show()
13
3.0 Body of Internship Report
• To know the difference between running Python programs on Mac and Windows
• Be able to sort lists -Be able to edit records and load them from CSV files
• Be able to work with different python libraries like numpy, pandas, matplotlib
14
3.2 Detail of Working Experience
15
information. In carrying out my duties, I relied heavily on Matplotlib, a powerful library
in Python for creating high-quality visualizations of data.
My responsibilities included creating a range of visualizations, including scatterplots,
bar charts, and heatmaps, using Matplotlib. I used Matplotlib's various plotting
functions, such as plt.scatter() and plt.bar(), to create these visualizations. Through these
efforts, I was able to present data in a visually appealing and informative way, enabling
stakeholders to make better decisions.
One of my most significant projects involved analyzing sales data to identify trends and
patterns. I used Matplotlib to create visualizations that showed how sales fluctuated over
time and how different products performed in different regions. I faced challenges such
as dealing with missing data and outliers. I used Matplotlib's tools, such as plt.boxplot()
and plt.hist(), to identify and handle these issues. By presenting these visualizations to
the company, we were able to identify areas for improvement and develop new
strategies to increase sales.
In my role as a Data Analyst, I developed a deep appreciation for the power and
flexibility of Matplotlib in creating high-quality visualizations of data. Through my
experience, I was able to develop a strong skill set in data visualization, storytelling, and
communication. I am excited to continue using Matplotlib in future projects and
contribute to the growth and success of any company I work with.
16
3.2.1 Description of Technologies
Python is a high-level, interpreted programming language that was first released in 1991
by Guido van Rossum. It has since become one of the most popular programming
languages in the world, with a thriving community of developers and users. Python is
known for its simplicity, readability, and ease of use, making it an ideal language for
beginners and experts alike.
One of the defining features of Python is its focus on code readability. Unlike many
programming languages, Python emphasizes human-readable code over machine-
readable code. This means that Python code is often easier to understand and maintain,
even for those who are not familiar with the language. This makes Python an excellent
choice for collaborative projects or for teams with diverse programming backgrounds.
Python is also an interpreted language, which means that it does not need to be compiled
before it can be executed. This allows for a faster development cycle and makes it easy
to test and debug code. Additionally, Python is a dynamically typed language, meaning
that variables do not need to be declared before they are used. This can lead to faster
development times, as well as more flexible and adaptable code.
Python is a versatile language that can be used for a wide range of applications. It is
often used in data science, machine learning, and artificial intelligence, where its ease of
use and extensive libraries make it an ideal choice. Additionally, Python can be used for
web development, game development, and desktop applications. Python has a vast
ecosystem of libraries and frameworks, such as Django and Flask for web development,
Pygame for game development, and PyQt for desktop applications.
One of the most significant advantages of Python is its extensive standard library. The
standard library includes a wide range of modules that can be used for everything from
data manipulation to web scraping to networking. Additionally, Python has a large and
active community of developers who contribute to the development of additional
libraries and modules. This means that it is often easy to find a library that can help you
accomplish your task quickly and efficiently.
Python is also a cross-platform language, meaning that code written on one platform
(such as Windows) can be run on another platform (such as Linux or MacOS) without
modification. This makes Python an ideal choice for projects that need to run on
multiple platforms.
Finally, Python is known for its ease of use and learnability. The language is designed to
be accessible and easy to understand, even for those who are new to programming.
Python's syntax is simple and easy to read, which can help new programmers quickly
learn the basics of programming. Additionally, Python has a wealth of resources
available, including documentation, tutorials, and online courses, making it easy to get
started with the language.
In conclusion, Python is a powerful and versatile programming language that has
become a favorite of developers around the world. Its focus on code readability, ease of
use, and extensive library make it an ideal choice for a wide range of applications, from
data science to game development. Its cross-platform compatibility and active
community of developers also make it a popular choice for collaborative projects.
17
3.2.2 Description of Tasks/ Modules
Pandas:- Pandas is an open-source Python library for data manipulation and analysis. It
provides data structures for efficiently storing and processing large amounts of data, as
well as functions for transforming, aggregating, and visualizing data. Pandas is widely
used in data science and data analysis applications due to its powerful and flexible
capabilities.
One of the primary data structures in Pandas is the DataFrame, which is a two-
dimensional table-like data structure consisting of rows and columns. DataFrames are
commonly used to represent tabular data, such as data from spreadsheets or databases.
They can be easily loaded from and saved to various file formats, such as CSV, Excel,
SQL, and more.
Pandas also provides Series, a one-dimensional array-like data structure that can be used
to represent a single column of a DataFrame or a standalone data structure. Series are
often used for time-series data or as labels for rows or columns of a DataFrame.
One of the strengths of Pandas is its ability to handle missing or incomplete data. Pandas
provides a number of functions for filling in or dropping missing data, which can be
important for data analysis and modeling.
18
Another key feature of Pandas is its ability to manipulate and transform data. Pandas
provides a wide range of functions for data cleaning, such as filtering, merging, and
reshaping data. It also provides powerful grouping and aggregation functions, which can
be used to summarize and analyze data.
Pandas provides a range of functions for statistical analysis, including descriptive
statistics, correlation analysis, and regression analysis. These functions are useful for
understanding the characteristics of data and identifying relationships between variables.
Pandas also provides a number of visualization functions for creating graphs and charts
to help visualize data. These functions include bar charts, line charts, scatter plots, and
more. These visualizations can be customized to suit specific needs and preferences.
Pandas is designed to work seamlessly with other Python libraries, such as NumPy,
Matplotlib, and Scikit-learn. This makes it easy to integrate Pandas into existing data
science workflows and pipelines.
Overall, Pandas is a powerful and flexible library for data manipulation and analysis. Its
data structures and functions provide a wide range of capabilities for working with data,
from data cleaning and transformation to statistical analysis and visualization. Pandas is
widely used in data science and data analysis applications and is a valuable tool for
anyone working with large and complex datasets.
19
3.2.3 Modules Snapshots
20
21
3.3 Conclusion
My internship experience working with the Python libraries NumPy, Pandas, and
Matplotlib was both challenging and rewarding. These libraries are fundamental tools
for data analysis and visualization in Python, and I gained a deeper understanding of
their capabilities and how they can be applied to real-world problems.
Working with NumPy allowed me to gain a solid foundation in numerical computing in
Python. NumPy provides a wide range of functions for working with arrays, which are
powerful data structures for storing and processing large amounts of numerical data. I
was able to learn how to perform operations on arrays, such as element-wise arithmetic,
slicing, and indexing. Additionally, I learned about the various functions that NumPy
provides for linear algebra, such as matrix multiplication and decomposition, which are
essential tools for many data analysis tasks.
Pandas was another important library that I worked with during my internship. Pandas
provides data structures for efficiently storing and processing large amounts of data, as
well as functions for transforming, aggregating, and visualizing data. I was able to learn
how to create and manipulate Data Frames, which are two-dimensional table-like data
structures consisting of rows and columns. I also gained experience with Pandas'
functions for grouping, filtering, and pivoting data, which are powerful tools for data
analysis and cleaning. Finally, I learned how to create visualizations using Matplotlib,
which is a widely used library for creating high-quality plots and charts.
Overall, my internship experience working with NumPy, Pandas, and Matplotlib
provided me with a deeper understanding of Python's capabilities for data analysis and
visualization. I gained valuable skills in manipulating and analyzing data, and learned
how to create compelling visualizations that communicate insights from data effectively.
Moreover, I developed a strong foundation in the Python programming language and its
ecosystem of libraries, which will be valuable in future projects. In conclusion, my
internship experience working with NumPy, Pandas, and Matplotlib was a valuable
learning experience that allowed me to develop my skills in data analysis and
visualization in Python. I feel confident in my ability to apply these tools to real-world
problems and look forward to using them in future projects. I am grateful for the
opportunity to have worked with these libraries and to have gained the skills and
knowledge that I did during my internship.
22