LEARN PYTHON THROUGH SERIES OF ROBOT'S ACTIVITIES
Sales Forecast -An Example:
Blessy is an analyst robot. She works as a waitress in a sales hall. Her boss lady learns a lot of information from her every day. Specifically, it includes
details such as revenue for a day, list of best-selling items, list of least-selling
items, number of employees, salary, and sales details of new items. Today was
the first day of the Month, and Blessy began to struggle with her work. It was
an amazing process to extract vast amounts of new data from her calculations.
For example, details such
as, which products a certain age group buys and how many of the same products
are the most purchased on the list.
Now she tells her master about
today's information.
Blessy, the
analyst robot, has to read the files which contain the business data. Python
libraries are mostly supported for the EDA.
[In]import pandas as pd
[In]import numpy as np
[In]import matplotlib as plt
[In]import seaborn as sns
[In]import csv
[In]from pandas import read_csv
[In]path=r"c:\Users\ELCOT\Documents\MLP
ENGINEERS\ML SHEET12.csv"
#File location must be
provided. To get the document - excel sheet: https://drive.google.com/file/d/1yWXPmUbh-1j8_ceMuovkvcXw92ZQJzJE/view?usp=share_link
[In]data=read_csv(path)
[In]print(data.shape)
[Out](17, 9)
[In]data.head()
[In]print(data[:3])
[Out]
s.n
date cus_name
products price count order_price base_price
0-1
04-05-2022 cus 1 pro 1 10 5 50 4
1-2 05-05-2022
cus 2 pro 2 20
3 60 2
2-3 06-05-2022
cus 3 pro 3 30
34 1020 33
[Out]profit
0
10
1
20
2
30
[In]len(data)
[Out]17
[In]a=data["price"].isna().sum()
[In]print(a)
[Out]0
[In]a=data['products'].isna().sum()
[In]print(a)
[Out]0
[In]print(data.shape)
[Out] (17,
9)
[In]print(data[:3])
[Out]
s.n date cus_name products price
count order_price base_price
\
0
1 04-05-2022 cus 1
pro 1 10 5 50 4
1
2 05-05-2022 cus 2
pro 2 20 3 60 2
2
3 06-05-2022 cus 3
pro 3 30 34
1020 33
profit
0
10
1
20
2
30
No comments:
Post a Comment