SalesMgmtSystem XII IP Projectreport 2022 23

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

CHINMAYA VIDYALAYA

PALLAVUR

PROJECT REPORT ON
SALES MANAGEMENT
AS PART OF INFORMATICS PRACTICES [065]
CLASS XII

Submitted by: Submitted to:

Ananya Balraj Mrs.K.Usha Baburaj


CERTIFICATE

This is to certify that the Informatics Practices Project work title “sales
management system” is a bonafide work done by Ananya Balraj of
class XII of Chinmaya Vidyalaya Pallavur under the guidance and
supervision of Mrs K.Usha Baburaj during the academic year 2022-
23.

Signature of Signature of

INTERNAL EXAMINER EXTERNAL EXAMINER

Signature of Principal
ACKNOWLEDGEMENT

I would specially thank Mrs K .Usha Baburaj, our


informatics practices teacher for providing her valuable
guidance, suggestions and comments throughout the
course of project.

I would also like to express my sincere gratitude to our


Principal Mr. Jayan Kambrath for providing an opportunity
to work of investigatory project on the topic “sales
management system”
TABLE OF CONTENTS

1. About the project


2. Short description of the modules
3. Implementation
4. Output screenshots
5. Limitations
6. Requirements
7. Bibliography
About the Project

This project is based on maintaining sales details of a


vendor. The main process includes adding, updating,
analysing and visualizing the sales data.

The project includes various functions of python pandas


and CSV libraries to perform various task as mentioned.
Short description of the modules
PANDAS
Pandas is an open-source library that is made mainly for working with relational
or labelled data both easily and intuitively. It provides various data structures and
operations for manipulating numerical data and time series. This library is built
on top of the NumPy library. Pandas is fast and it has high performance &
productivity for users.
Advantages
• Fast and efficient for manipulating and analysing data.
• Data from different file objects can be loaded.
• Easy handling of missing data (represented as NaN) in floating point as
well as non-floating-point data
• Size mutability: columns can be inserted and deleted from DataFrame and
higher dimensional objects.
CSV
A CSV file (Comma Separated Values file) is a type of plain text file that uses
specific structuring to arrange tabular data. Because it's a plain text file, it can
contain only actual text data—in other words, printable ASCII or Unicode
characters. The structure of a CSV file is given away by its name
MATPLOTLIB
Matplotlib is a comprehensive library for creating static, animated, and
interactive visualizations in Python. Matplotlib makes easy things easy and hard
things possible.
• Create publication quality plots.
• Make interactive figures that can zoom, pan, update.
• Customize visual style and layout.

Implementation
sales.csv
Salecode Productname company vendor productcost yearofsale tax saleamount
1 soap Lifebouy Suresh 10000 2020 2000 12000
2 phone Redmi Ramesh 20000 2021 4000 24000
3 ps4 sony William 100000 2022 5000 105000
4 mascara Nykaa Sianne 200000 2019 10000 210000
5 jersey six5sports Ronaldo 450000 2022 5500 455500

Source code:
import pandas as pd

import matplotlib.pyplot as plt

def main_menu():

print("\n------- Sales Management System -------\n")

print("1. Create/Import New Dataframe")

print("2. Sales Data Analysis")

print("3. Data Visualisation")

print("4. Export Dataframe to csv file")

def create_dataframe_menu():

print("\n------- Create Dataframe -------\n")

print("1. Create Dataframe")

print("2. Import Dataframe from csv file")

print("3. Add/Modify Custom Index")

print("4. Add/Modify Custom Column Head")


print("5. Return to main menu")

def analysis_menu():

print("\n------- Data Analysis using Python -------\n")

print("1. Display All records")

print("2. Print first nth records")

print("3. Print last nth records")

print("4. Print All records in order of Product name")

print("5. Display products with maximum Sales ")

print("6. Display products with minimum Sales")

print("7. Display Product which is sold in less number")

print("8. Print distinct vendor")

print("9. Update Details")

print("10. Return to main menu")

def visualisation_menu():

print("\n------- Visualisation using Matplotlib -------\n")

print("1. Plot Line graph (Product wise Sales)")

print("2. Plot Bar graph (Product, Sales)")

print("3. Return to main menu")

cols = ['Salecode','Productname','company','vendor','productcost','yearofsale','tax','saleamount']

df = pd.DataFrame([],columns = cols) # Create an EmptyDataFrame

while True:

main_menu()

ch = int(input("Select Option: "))

if ch == 1:

# Create New Dataframe

create_dataframe_menu()

ch = int(input("Select Option: "))


if ch == 1:

data = []

while True:

ch = input("Add Row [y/n]")

if ch.lower() == 'y':

scode = int(input("Sale Code: "))

pname = input("Product Name: ")

company = input("Enter company name ")

vendor=input("Vendor name:")

pcost = int(input("Basic salary: "))

year = int(input("Year of sale(YYYY): "))

tax= float(input("Tax: "))

saleamount = pcost+tax

data.append([scode, pname, company,vendor, pcost,year,tax,saleamount])

else:

break

df = pd.DataFrame(data, columns = cols)

elif ch == 2:

file = input("File name: ")

df = pd.read_csv(file)

elif ch == 3:

index_list = input("Index List: ").split(",")

df.index = index_list

elif ch == 4:

column_list= input("Column List: ").split(",")

df.columns = column_list

print(df)

elif ch == 2:

while True:
# Student Data Analysis

analysis_menu()

ch = int(input("Select Option: "))

if ch == 1:

print(df)

elif ch == 2:

nth = int(input("Enter no of rows to display: "))

print(df.head(nth))

elif ch == 3:

nth = int(input("Enter number of rows to display: "))

print(df.tail(nth))

elif ch == 4:

print(df.sort_values(by='Productname'))

elif ch == 5:

print(df[df['saleamount'] == df['saleamount'].max()])

elif ch == 6:

print(df[df['saleamount'] == df["saleamount"].min()])

elif ch == 7:

print(df[df['saleamount']<= 1000])

elif ch == 8:

print(df['Productname'].unique())

elif ch == 9:

while True:

ch = input("Add Row [y/n]")

if ch.lower() == 'y':

scode = int(input("Sale Code: "))

pname = input("Product Name: ")

company = input("Enter company name ")

vendor=input("Vendor name:")

pcost = int(input("Basic salary: "))


year = int(input("Year of sale(YYYY): "))

tax= float(input("Tax: "))

saleamount = pcost+tax

df = df.append({"Salecode": scode, "Productname":pname,

"company": company, "vendor": vendor, "productcost": pcost,

"yearofsale": year, "tax": tax,"saleamount": saleamount}, ignore_index=True)

elif ch == 10:

break

else:

break

elif ch == 3:

while True:

# Student Data Visualisation

visualisation_menu()

ch = int(input("Select Option: "))

if ch == 1:

plt.plot(df['Productname'], df['productcost'], label='Product Cost', color = "blue", marker="*")

plt.plot(df['Productname'], df['tax'], label='Tax', color = "green", marker="*")

plt.plot(df['Productname'], df['saleamount'], label='Sale amount', color = "purple", marker="*")

plt.xlabel("Products", fontsize=12)

plt.ylabel("Sale value", fontsize=12)

plt.title("Sale Wise product details", fontsize=16)

plt.legend()

plt.show()

elif ch == 2:

x_values = df["Productname"]

y_values = df['saleamount']

plt.bar(x_values, y_values, color = 'orange')

plt.xlabel("Productname", fontsize=12)

plt.ylabel("Amount of Sales", fontsize=12)


plt.title("Product wise Sales Visualisation", fontsize=14)

plt.show()

elif ch == 3:

print("Returning to main menu")

break

else:

print("Wrong Option Selected! ")

elif ch == 4:

# Export Dataframe to csv file

file = input("File name: ")

df.to_csv(file, index = False)

elif ch == 5:

# Exit

print("Bye ...")

exit()

else:

# Error Display and Exit

print("Error! Wrong option selected. ")

break
Output Screenshots

1) Creating Dataframe
2) Data Analysis
a) Display all records

b) Print last nth records


c) Print all records in order of product name.

d) Display product with maximum sales.


e) Display products with minimum sales.

3) Data Visualisation
a)

b)
LIMITATIONS
• Graphical interfacing can be added
• Exporting csv files to remote servers

REQUIREMENTS
• Computer System with min 2 GB RAM
• Python 3.7/3.8 or higher
• Windows/ Linux OS

BIBILOGRAPHY
• Class 12 Sumitha Aroara Informatics Practices Text book
• www.python4csip.com
• http://python.mykvs.in

You might also like