diff --git a/Spreadsheet_Automation/PriceBook.xlsx b/Spreadsheet_Automation/PriceBook.xlsx new file mode 100644 index 0000000000..fcdb7483d2 Binary files /dev/null and b/Spreadsheet_Automation/PriceBook.xlsx differ diff --git a/Spreadsheet_Automation/Purchases - Home B.xlsx b/Spreadsheet_Automation/Purchases - Home B.xlsx new file mode 100644 index 0000000000..6e210ded75 Binary files /dev/null and b/Spreadsheet_Automation/Purchases - Home B.xlsx differ diff --git a/Spreadsheet_Automation/Readme.md b/Spreadsheet_Automation/Readme.md new file mode 100644 index 0000000000..29404b3802 --- /dev/null +++ b/Spreadsheet_Automation/Readme.md @@ -0,0 +1,36 @@ +# Spreadsheet Automation + +[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) + +## Spreadsheet Automation Functionalities : πŸš€ + +- First upload two datasets +- The script will we compare the two datasets +- The output will be a pie chart + +## Spreadsheet Automation Instructions: πŸ‘¨πŸ»β€πŸ’» + +### Step 1: + + Open Termnial πŸ’» + +### Step 2: + + Locate to the directory where python file is located πŸ“‚ + +### Step 3: + + Run the command: python script.py/python3 script.py 🧐 + +### Step 4: + + Sit back and Relax. Let the Script do the Job. β˜• + +### Requirements + + - pandas + - plotly + +## Author + + Amit Kumar Mishra \ No newline at end of file diff --git a/Spreadsheet_Automation/script.py b/Spreadsheet_Automation/script.py new file mode 100644 index 0000000000..fce806ff0f --- /dev/null +++ b/Spreadsheet_Automation/script.py @@ -0,0 +1,25 @@ +# importing libraries + +import pandas as pd +import plotly.express as px + +# storing the dataset +data1 = input("Enter first dataset") +data2 = input("Enter second dataset") + +# reading the data +data_read_1 = pd.read_excel(data1) +data_read_2 = pd.read_excel(data2) + +#print​(df_prices, df_home_1) + +reference = input("What is the basis of merging? ") +data_total = data_read_2.merge(data_read_1, on=reference) + + +#print​(df_total) +criteria_1=input("Enter criteria 1") +criteria_2=input("Enter criteria 2") +fig = px.pie(data_total[[criteria_1, criteria_2]], values=criteria_2, names=criteria_1) +fig.show() +