Scenario for using Python and Excel Request 1 Take the following 3 excel files: sales_jan_2022.xlsx sales_feb_2022.xlsx sales_mar_2022.xlsx and create a new excel: sales.xlsx and a new csv file: sales.csv with all the records from these 3 excel files. Request 2 Take the following 3 excel files: sales_jan_2022.xlsx sales_feb_2022.xlsx sales_mar_2022.xlsx and create a new excel: total_sales.xlsx and a new csv file: total_sales.csv with total of Actual_Quantity for each month. Request 3 Take the following 3 excel files: sales_jan_2022.xlsx sales_feb_2022.xlsx sales_mar_2022.xlsx and create a new excel: total_sales_by_salesperson.xlsx and a new csv file: total_sales_by_salesperson.csv with total of Actual_Sales per month for each salesperson. Request 1, 2 and 3 are completed with python script: main.py. See it in action . . . (watch the video below) Request 4 Take the following excel files: sales.xlsx total_sales_by_salesperson.xlsx and change the styling so it is easier to read them. Request 4 is…
Πως να επιλέγετε γραμμές και στήλες με τη βιβλιοθήκη pandas της γλώσσας προγραμματισμού Python See below the data and the code for the result shown on image . . . How to select rows and columns in pandas # Credit : Trifonas Papadopoulos, Oct 4th, 2022, Version 2.0 # start of code —————————————————————————————– import pandas as pd import numpy as np # data data = [[‘A0001′,”,”,”,0,’variable’,0,0], [‘A0001′,’WHITE’,’S’,’Small’,1,’variation’,0,0], [‘A0001′,’WHITE’,’M’,’Medium’,2,’variation’,0,0], [‘A0001′,’WHITE’,’L’,’Large’,3,’variation’,0,0], [‘A0001′,’WHITE’,’XL’,’Extra Large’,4,’variation’,0,0], [‘A0001′,’BLACK’,’L’,’Large’,5,’variation’,0,0], [‘A0003′,”,”,”,6,’variable’,0,0], [‘A0003′,’BLACK’,’XL’,’Extra Large’,7,’variation’,0,0], [‘A0002′,”,”,”,8,’variable’,0,0], [‘A0002′,’BLACK’,’L’,’Large’,9,’variation’,0,0], [‘A0002′,’BLACK’,’XL’,’Extra Large’,10,’variation’,0,0], [‘A0004′,”,”,”,12,’variable’,0,0], [‘A0004′,’WHITE’,’S’,’Small’,12,’variation’,0,0], [‘A0004′,’RED’,’S’,’Small’,13,’variation’,0,0], [‘A0004′,’RED’,’M’,’Medium’,14,’variation’,0,0], [‘A0001′,’WHITE’,’XXL’,’2 Extra Large’,15,’variation’,0,0], ] # print list of columns print(‘–list of columns———————————————————–‘) cols = list(df.columns.values) print(cols) # dataframe with defined column names df = pd.DataFrame(data, columns=[‘parent’, ‘color’, ‘size’, ‘size_desc’, ‘order’, ‘type’, ‘quantity’,’price’]) print(”) print(‘–dataframe with defined column names—————————————‘) print(df) # end of code —————————————————————————————– If you want to see more ways to select rows and columns in pandas (Python), read my code (Version…
Let’s assume that you have 2 excel files : product_data_excel.xlsx (99 rows x 5 columns, A2: E100) product_data_excel_2.xlsx (107 rows x 5 columns, A2:E108) The 5 columns of the two excel files are : product_id, product_description, quantity, regular_price and category.product_data_excel.xlsx You have changed quantity and price values for existing product_ids : “A0001” and “A0003” (column : “product_id”) and you have added 8 new products in excel file : product_data_excel_2.xlsx. product_data_excel_2.xlsx Now you want to compare product_data_excel.xlsx and product_data_excel_2.xlsx and create a new excel file : product_data_excel_changed_and_new_records.xlsx and csv file : product_data_excel_changed_and_new_data.csv with the 2 existing products you have changed and the 8 new ones you have added. product_data_excel_changed_and_new_records.xlsx Download product_data_excel.xlsx, product_data_excel_2.xlsx, product_data_excel_changed_and_new_records.xlsx, product_data_excel_changed_and_new_records.csv Click comparing_data_values_between_2_excel_files to see the code (html format) . . .
Let’s assume that you got three csv files from the sales department : “_sales_january_2021_d.csv” “_sales_feb_2021_d.csv”“_sales_mar_2021_d.csv” and you want : to join them in one new csv file : “sales_jan_feb_mar_2021_d.csv” to find actual sales sum per month, actual sales sum (quantity) per month and actual sales mean per month to save actual sales by person per month in csv file : “sales_by_person.csv”and in excel file : “sales_by_person.xlsx” to save “sales_by person.csv” as “sales_by_person_modified.csv” with different english headers to save “sales_by person.csv” as “sales_by_person_modified_gr.csv” with different greek headers to find actual sales sum, actual sales mean and actual sales total for salesperson : “Trifon Papadopoulos” to create a graph(bar) for Actual Sales total per Salesperson to create a graph(bar) for Actual Sales total per Month_ref to join “sales_jan_feb_mar_2021_d.csv” with “sales_january_2021_d_products_orders.csv” and save the output to excel file : “output1.xlsx” to improve styling of excel files : “sales_jan_feb_mar_2021_d.xlsx” and “output1.xlsx” Results of…
Excel file 1 : sales_january_2021_d.xlsx – Download : https://lnkd.in/dyT6zrCX Excel file 2 : sales_feb_2021_d.xlsx – Download : https://lnkd.in/d5aaNWiq Excel file 3 : sales_march_2021_d.xlsx – Download : https://lnkd.in/d-G2hNiM Task Collection of data from the above mentioned three different excel files and creation of a new one : sales_jan_feb_mar_2021_d.xlsx – Download : https://lnkd.in/d-PTEPtv with three different sheets : sales_data month_productivity salesperson_productivity We did a comparison between Budget and Actual Sales. The reason we did this is to know the month productivity and the salesperson productivity for months Jan, Feb and Mar 2021. All sheets, data, graphs and styling in file : sales_jan_feb_mar_2021_d.xlsx have been created automatically with python coding. Tools used : Excel, Python #programming #coding #python #productivity #data_analysis #mindstormGR / www.mindstorm.gr Code for this project from ctypes.wintypes import WORD import pandas as pd import numpy as np import matplotlib.pyplot as plt importopenpyxl from openpyxl.styles import PatternFill, Border, Side, colors, Alignment, Protection,…
Εξαγωγικό πλάνο ανάπτυξης (Export Business Plan) Ο κύριος στόχος ενός εξαγωγικού πλάνου δράσης είναι να παρουσιάσει με λεπτομέρεια και σαφήνεια – και εφόσον λάβει υπόψη όλους τους ενδεχόμενους περιοριστικούς παράγοντες – την κατάσταση στην οποία βρίσκεται η επιχείρηση, τους στόχους που έχει θέσει για το εξαγωγικό εγχείρημα και γενικότερα όλες τις επιμέρους συνιστώσες, όπως στρατηγική μάρκετινγκ, στρατηγική πωλήσεων, χρηματοοικονομικός σχεδιασμός και έρευνα αγορών. Το εξαγωγικό πλάνο είναι ο χάρτης που θα βοηθήσει την επιχείρηση να αντεπεξέλθει στις υψηλές απαιτήσεις που θέτει η αγορά των εξαγωγών. Το επιχειρηματικό εξαγωγικό σχέδιο βοηθά την επιχείρηση: ⇒ Να ορίσει την επιχειρηματική της δομή μέσω της καταγραφής της οργανωσιακής διάρθρωσής της, αναλύοντας τα δυνατά και αδύνατα σημεία της και εξετάζοντας ταυτόχρονα και εξωτερικούς παράγοντες, ευκαιρίες και απειλές (ανάλυση SWOT). ⇒ Να συγκεκριμενοποιήσει τους στόχους της σχετικά με τις εξαγωγές (μακροπρόθεσμοι, μεσοπρόθεσμοι και βραχυπρόθεσμοι στόχοι). ⇒ Να καταγράψει ποιο προϊόν θα διαθέσει στην αγορά και ποιες…