0% found this document useful (0 votes)
32 views

Part A

Na

Uploaded by

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

Part A

Na

Uploaded by

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

CONTENTS

Chapter No. Title Page No.


Part A
Company Profile 3
Abstract 7

Chapter 1 Overview of the course 8

Chapter 3 Topics Covered in the course 9


Chapter 4 Practice Questions 10
4.2 Introduction to NumPy library 21
4.3 Introduction to Pandas library 22
4.4 Introduction to Matplotlib library 24
Chapter 5 Power BI Application 27

5.2 Dashboard Creation 28

Part B
Chapter 1 Assignment Questions 29
Python with Data Analytics

COMPANY PROFILE

Established in 2022 in the vibrant city of Tumakuru, MeVi Technologies LLP has swiftly emerged as
a dynamic force in the IT industry. Comprising a team of energetic and innovative engineers with
extensive hands-on experience, Mevi Technologies is dedicated to shaping the future of aspiring
students and IT professionals.

Origin Story:
The inception of Mevi Technologies is rooted in a collective realization among our founders. After
gaining valuable insights into the IT industry, we recognized a critical gap in the educational
landscape – the need for comprehensive industrial training. This realization fuelled our passion to
contribute to the growth of aspiring individuals and the IT sector as a whole.

Mission:
At the core of Mevi Technologies is a mission to empower students and IT professionals by
providing them with the necessary skills and knowledge to navigate the ever-evolving IT landscape
successfully. We understand that securing a career in dream companies requires more than
theoretical knowledge it demands practical, industry-relevant skills.

3
Python with Data Analytics

Vision:
“Mevi Technologies LLP.” is started in the year 2022 in Tumakuru. We are energetic and innovative
engineers having hands-on experience in the IT industry. All of us came after gaining insights of the
IT industry we came to know that industrial training is very much needed for all students and we
came up with our start-up to help students and IT professionals for upgrading their skills and
knowledge to secure a career in their dream companies.

Approved By:

4
Python with Data Analytics

Services:
We develop innovative and creative products and services that provide total Communication and
Information solutions according to business needs

Web application development:


We cover all types of web development services from creating plain text pages to complex web-
based applications, social network applications, and electronic business applications.

Mobile application development:


We have the best development team and best design practices to provide a full cycle of mobile app
development for both, Android and IOS devices.

Logo designing:
Our Creative Logo Design Service, promote your company and take your brand to new heights. We
have a talented design team to help you create a unique logo that represents your company.

Digital Marketing:
Our dedicated experts will find your targeted audiences and create advertisements and strategies after
analysing the view, requirements, and expectations of the audience so that they get influenced and
buy your products leading to more sales!

UI and UX designing:
We offer a wide range of UI/UX design services which include: Branding Mobile app UX and UI
design services Cross-platform experiences design UI and UX consulting Web design services
Promotional designs

5
Python with Data Analytics

Special Academic Services:


At MeVi technologies we do offer mini and major project support to students and also tech talks on
various leading technologies and industrial news.
We do provide in-house internships on different technologies which might last for about 15 days and
everything will be hands-on sessions at the end of the internship certificates will be provided to
students.

Interview preparations:
At MeVi we have a special corporate training team that includes experts in the human resource
department and the hiring department, who can provide reasonable assistance in facing the
interviews with confidence at major tech companies and also offer practice coding sessions and
mock interviews.

6
Python with Data Analytics

ABSTRACT

Data Analysis is the technique of collecting, transforming, and organizing data to make
future predictions and informed data-driven decisions. It also helps to find possible
solutions for a business problem. There are six steps for Data Analysis. They are:
 Ask or Specify Data Requirements
 Prepare or Collect Data
 Clean and Process
 Analyze
 Share
 Act or Report

data analysis is generally considered a promising career with solid job prospects and
competitive salaries. The demand for data analysts is growing rapidly as more and more
companies realize the importance of data-driven decision-making. With the right skills
and experience, data analysts can advance to more senior roles such as data scientist or
analytics manager. Additionally, the skills required for a data analyst role are
transferable across industries, allowing for a range of career opportunities.

7
Python with Data Analytics

CHAPTER 1
OVERVIEW
This course presents a gentle introduction to the concepts of data analysis, the role of a Data
Analyst, and the tools that are used to perform daily functions. You will gain an
understanding of the data ecosystem and the fundamentals of data analysis, such as data
gathering or data mining. You will then learn the soft skills that are required to effectively
communicate your data to stakeholders, and how mastering these skills can give you the
option to become a data- driven decision maker.

SKILLS LEARNT 1.1

Understand the landscape of Python data visualization libraries Create static and
interactive charts using specialized Python libraries.
Saving the created charts for later use, including images and Office document
formats

8
Python with Data Analytics

CHAPTER 3
TOPICS COVERED IN THE COURSE

 Basic Python Data Structures


 Python Packages and Modules
 Importing Your Own Code
 Installing Packages using PIP
 Data set
 Types of data sets
 Introduction NumPy
 Python NumPy array
 operations on the NumPy array
 NumPy and random data
 NumPy array with images
 Introduction to pandas
 Series
 Data Frame
 Introduction to Matplotlib
 Introduction to Power BI
 Dashboard Creation

9
Python with Data Analytics

4.2 INTRODUCTION TO NUMPY LIBRARY

NumPy is an array processing package in Python and provides a high-performance multidimensional array
object and tools for working with these arrays. It is the fundamental package for scientific computing with
Python.

N8mPy Array is a table of elements (usually numbers), all of the same types, indexed by a tuple of positive
integers. In NumPy, the number of dimensions of the array is called the rank of the array. A tuple of integers
giving the size of the array along each dimension is known as the shape of the array.

NumPy arrays can be created in multiple ways, with various ranks. It can also be created with the use of
different data types like lists, tuples, etc. The type of the resultant array is deduced from the type of elements
in the sequences. NumPy offers several functions to create arrays with initial placeholder content. These
minimize the necessity of growing arrays, an expensive operation.

Sample Code for NumPy Array Creation:

import numpy as np
b = np.zeros(2, dtype = int)
print("Matrix b : \n", b)
a = np.zeros([2, 2], dtype = int)
print("\nMatrix a : \n", a)
c = np.zeros([3, 3]) print("\
nMatrix c : \n", c)

10
Python with Data Analytics

CHAPTER 4.3
INTRODUCTION TO PANDAS LIBRARY

Python Pandas Is used for relational or labeled data and provides various data structures for manipulating
such data and time series. This library is built on top of the NumPy library. This module is generally
imported as:
import pandas as pd
Here, pd is referred to as an alias to the Pandas. However, it is not necessary to import the library using the
alias, it just helps in writing less amount code every time a method or property is called. Pandas generally
provide two data structures for manipulating data, They are:

 Series
 Data frame

Series:
Pandas Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float,
python objects, etc.). The axis labels are collectively called indexes. Pandas Series is nothing but a column
in an excel sheet. Labels need not be unique but must be a hashable type. The object supports both integer
and label-based indexing and provides a host of methods for performing operations involving the index.

11
Python with Data Analytics

Data frame:
Pandas Data Frame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with
labelled axes (rows and columns). A Data frame is a two-dimensional data structure, i.e., data is aligned in a
tabular fashion in rows and columns. Pandas DataFrame consists of three principal components, the data,
rows, and columns.

It can be created using the Dataframe() method and just like a series, it can also be from different file types
and data structures.
Sam
import pandas as pd
# Calling DataFrame constructor
df = pd.DataFrame()
print(df)
lst = ['Geeks', 'For', 'Geeks', 'is',
'portal', 'for', 'Geeks']
df = pd.DataFrame(lst)
df

12
Python with Data Analytics

CHAPTER 4.4
INTRODUCTION TO MATPLOTLIB LIBRARY

Matplotlib is easy to use and an amazing visualizing library in Python. It is built on NumPy arrays and
designed to work with the broader SciPy stack and consists of several plots like line, bar, scatter, histogram,
etc.

Pyplot

Pyplot is a Matplotlib module that provides a MATLAB-like interface. Pyplot provides functions that
interact with the figure i.e. creates a figure, decorates the plot with labels, and creates a plotting area in a
figure.

13
Python with Data Analytics

Bar chart

A bar plot or bar chart is a graph that represents the category of data with rectangular bars with lengths and
heights that is proportional to the values which they represent. The bar plots can be plotted horizontally or
vertically. A bar chart describes the comparisons between the discrete categories. It can be created using the
bar() method.

Histograms

A histogram is basically used to represent data in the form of some groups. It is a type of bar plot where the
X-axis represents the bin ranges while the Y-axis gives information about frequency. To create a histogram
the first step is to create a bin of the ranges, then distribute the whole range of the values into a series of
intervals, and count the values which fall into each of the intervals. Bins are clearly identified as
consecutive, non-overlapping intervals of variables. The hist() function is used to compute and create a
histogram of x.

14
Python with Data Analytics

Scatter Plot

Scatter plots are used to observe relationship between variables and uses dots to represent the
relationship between them. The scatter() method in the matplotlib library is used to draw a scatter
plot.

15
Python with Data Analytics

CHAPTER 5
POWER BI APPLICATION

Microsoft Power BI is an interactive data visualization software product developed by Microsoft with a
primary focus on business intelligence. It is part of the Microsoft Power Platform. Power BI is a collection of
software services, apps, and connectors that work together to turn various sources of data into static and
interactive data visualizations. Data may be input by reading directly from a database, webpage, PDF, or
structured files such as spreadsheets, CSV, XML, JSON, XLSX, and SharePoint.
Power BI provides cloud-based BI (business intelligence) services, known as "Power BI Services", along with
a desktop-based interface, called "Power BI Desktop". It provides data warehouse capabilities including data
preparation, data mining, and interactive dashboards. In March 2016, Microsoft released an additional service
called Power BI Embedded on its Azure cloud platform. One main differentiator of the product is the ability to
load custom visualizations.

This application was originally conceived by Thierry D'Hers and Amir Netz of the SQL Server Reporting
Services team at Microsoft. It was originally designed by Ron George in the summer of 2010 and named
Project Crescent. Project Crescent was initially available for public download on 11 July 2011, bundled with
SQL Server Codename Denali. Later renamed Power BI it was then unveiled by Microsoft in September 2013
as Power BI for Office 365. The first release of Power BI was based on the Microsoft Excel-based add-
ins: Power Query, Power Pivot and Power View. With time, Microsoft also added many additional features
like question and answers, enterprise-level data connectivity, and security options via Power BI Gateways.
[5]
Power BI was first released to the general public on 24 July 2015. It has several versions for desktop, web,
and mobile app.

On 14 April 2015, Microsoft announced that they had acquired the Canadian company Datazen, to
"complement Power BI, our cloud-based business analytics service, rounding out our mobile capabilities for
customers who need a mobile BI solution implemented on-premises and optimized for SQL Server." Most of
the 'visuals' in Power BI started life as Datazen visuals.

The software-reviewing company Gartner confirmed Microsoft as leader in the "2019 Gartner Magic Quadrant
for Analytics and Business Intelligence Platform" as a result of the capabilities of the Power BI platform. This
represented the 12th consecutive year of recognition of Microsoft as leading vendor in the magic quadrant
category (beginning three years before the tool was even created).

16
Python with Data Analytics

CHAPTER 5.2
DASHBOARD CREATION

The below dashboard is created using Microsoft Power BI Application

17
Python with Data Analytics

Pizza billing system


 import random
print("DOMINOS veg")
price=0 print("1)ORDER\
n2)EXIT")
ch=input("Enter your choice ")
if(ch=='1'):
print("small:149\nmedium:199\nlarge:299") size=print(input("enter the
size of pizza you want: ")) if(size=='small'):
price+=1
if(size=='medium'):
price+=199
if(size=='small'):
price+=299
print("which flavour buddy")
print("sweet corn:39\npaneer:99\nmargherita:59") flav=print(input("enter
the flavour of pizza you want: ")) if(flav=='sweet corn'):
price+=39
if(flav=='paneer'):
price+=99
if(flav=='margherita'):
price+=59
print(" base of pizza\npan:0\nhand tossed:19\ncheese burst:59")
base=print(input("enter the base you want"))
if(base=='hand tossed'):
price+=19
if(base=='cheese burst'):
price+=59
print(" any extra topping\nmushroom:29\npaneer:39\nonion:19:cheese:29")
extra=print(input("enter the toppings you want")) if(extra=='mushroom'):
price+=29
if(extra=="paneer"):
price+=39
if(extra=='onion'):
price+=19
if(extra=='cheese'):
price+=29
price=price*1.22
name=print(input("Enter your name: "))
num=print(int(input("Enter your number: ")))
otp=random.randint(100000,999999)
print(otp)

18
Python with Data Analytics
otpu=print(int(input("Enter your otp: ")))
print(otpu)

if(otpu==otp):
print("order received")
print("Total Amount is: ",price)
else:
print("your order is placed")
elif(ch=='2'):
print("sorry, hope we will meet soon")

OUTPUT:

DOMINOS veg
1) ORDER
2) EXIT
Enter your choice 1
small:149 medium:199
large:299
enter the size of pizza you want: medium medium
which flavour buddy
sweet corn:39 paneer:99
margherita:59
enter the flavour of pizza you want: sweet corn sweet corn
base of pizza
pan:0
hand tossed:19
cheese burst: 59
enter the base you want: hand tossed hand
tossed
any extra topping
mushroom:29
paneer:39 onion:19
cheese:29
enter the toppings you want: onion onion
Enter your name: shreya
shreya
Enter your number: 8296764871
8296764871
441761
Enter your otp: 441761
441761
your order is placed

19
Python with Data Analytics

otpu=print(int(input("Enter your otp: ")))


print(otpu)
if(otpu==otp):
print("order received")
print("Total Amount is: ",price)
else:
print("your order is placed")
elif(ch=='2'):
print("sorry, hope we will meet soon")
DOMINOS veg
3) ORDER
4) EXIT
Enter your choice 1
small:149 medium:199
large:299
enter the size of pizza you want: medium medium
which flavour buddy
sweet corn:39 paneer:99
margherita:59
enter the flavour of pizza you want: sweet corn sweet corn
base of pizza
pan:0
hand tossed:19
cheese burst: 59
enter the base you want: hand tossed hand
tossed
any extra topping
mushroom:29
paneer:39 onion:19
cheese:29
enter the toppings you want: onion onion
Enter your name: shreya
shreya
Enter your number: 8296764871
8296764871
441761
Enter your otp: 441761
441761
your order is placed

 Pass Book Printing Program


t=0
mpin=1234
balance=2000
dep=0
wit=0
while(t<3):
upin=int(input("Enter the pin:"))
t=t+1
if(mpin==upin):
print("Successfully logged in")
name=input("Enter the name of the account holder: ")
20
Python with Data Analytics

accno=input("Enter the account number: ")


print("1)deposit\n2)withdraw") ch=input("Enter your
choice ") if(ch=='1'):
dep=int(input("Enter the amount to deposit"))
balance+=dep
elif(ch=='2'):
wit=int(input("Enter the amount to withdraw"))
if(balance<wit):
print("Low balance cannot withdraw!")
balance=balance
else:
balance-=wit
else:
print("Invalid choice") print("The
Balance is ",balance)
print("Printing the pass book details:\n") print("NAME
----------------------->",name)
print("ACCOUNT NUMBER--->",accno)
print("DEPOSITED AMOUNT---->",dep)
print("WITHDRAWN AMOUNT- >",wit)
print("AVAILABLE BALANCE---->",balance)
break
elif(t==2):
print("Its your last try enter the correct pin") elif(t==3):
print("Sorry your account locked") break
else:
print("Invalid pin try again") Enter the
pin:123
Invalid pin try again Enter the
pin:1234 Successfully logged
in
Enter the name of the account holder: Madan Gopal Enter the
account number: 456789
1)deposit
2)withdraw
Enter your choice 1
Enter the amount to deposit20000
The Balance is 22000
Printing the pass book details:

NAME----> Madan Gopal


ACCOUNT NUMBER----> 456789
DEPOSITED AMOUNT----> 20000
WITHDRAWN AMOUNT----> 0
AVAILABLE BALANCE----> 22000

21
Python with Data Analytics

ANALYSING THE GIVEN DATA SET


We shall analyse the given data by plotting various graphs and then arrive at a conclusion.
Graph1: BMI V/S Insulin

Conclusion: Roughly the plotted graph is bell shaped and the major conclusion that could be drawn from
this graph is up to a certain level the increase in the body mass index will lead to the increase in the insulin
levels of an individual.

Graph 2: Diabetes pedigree function v/s BMI


Conclusion: Both the attributes taken along the x and y axis are not that compatible with each other and
does not show any considerable variations with each other thus nothing significant can be concluded.

Graph 3: Pregnancies v/s Insulin

22
Python with Data Analytics

Conclusion: The main conclusion that can be drawn from this graph is that the insulin levels of an
individual’s increase during the pregnancy and the chances of the diabetes in the later part of their life.

Graph 4: Blood Pressure v/s Insulin

Conclusion: Initially as Blood Pressure increases the insulin levels also show gradual increase but after a
certain level the increase in BP does not show any noticeable change.

23
Python with Data Analytics

Graph 5: Age v/s Insulin

Conclusion: As we can notice that age is not necessarily a determining factor for an individual to be affected
by diabetes, but on observing the graph in detail we can arrive at a conclusion that the individuals in middle
age are more prone to be infected with diabetes.

24
Python with Data Analytics

25

You might also like