excel

Unable to reference a excel marco file while running a juypter-notebook from another notebook

Unable to reference a excel marco file while running a juypter-notebook from another notebook Question: I’m trying to run a jupyter notebook file called Seg_pivot.ipynb from main.ipynb. The main.ipynb has one line of code: %run "fi/Seg_pivot.ipynb" The current directory structure looks like the following: The Seg_pivot.ipynb runs a module in the MyMacro, used to style …

Total answers: 1

How we can take mean from several excel files place wise using python

How we can take mean from several excel files place wise using python Question: Link to Sample Data Files I have 13 excel files in a folder, each of the excel file have 100 columns and uncertain rows (i.e.- may be from 20 to 40 rows depending upon the resultant data). I want a single …

Total answers: 1

reading multi-index header based excel file using pandas

reading multi-index header based excel file using pandas Question: I have an excel file where first 3 rows have header names, I want to read it in pandas but facing difficulty in the multi-index header. PLAN 2023 Traffic per channel Traffic Share per Channel month week All Traffic red green orange red green orange jan …

Total answers: 1

Saving Excel rows into lists in Python

Saving Excel rows into lists in Python Question: I basically want to save (for each row) the first 5 cells as floats to a list (say list1) then the sixth cell to another list (list2), then save both these to a list (list3). I want to do this for each rows and save each list3 …

Total answers: 2

Curve fitting in python compared to excel (variance in results)

Curve fitting in python compared to excel (variance in results) Question: I am fairly new to python, while I have used matlab quite a bit before. Currently I am trying to do an exponential curve fit to a semi logarithmic plot. Down below is the code I’ve currently got. import numpy as np import matplotlib.pyplot …

Total answers: 2

Dynamically renaming Pandas DataFrame columns based on configurable mapping

Dynamically renaming Pandas DataFrame columns based on configurable mapping Question: Python/Pandas here. I have 2 Excel files. In CSV form they look like: mappings.xlsx (as a csv) Id,Standard,FieldName 1,’Animal’,’Pet’ 2,’Color’,’Clr’ 3,’Food’,’Snack’ info.xslx (as a csv) Pet,Clr,Snack Dog,Blue,Pizza Cat,Purple,French Fries I want to read these 2 Excel files into Pandas DataFrames, and then use the mappings …

Total answers: 1

Whole column background formatted the same manner with openpyxl doesn't work as intended

Whole column background formatted the same manner with openpyxl doesn't work as intended Question: MRE: import openpyxl from openpyxl.styles import PatternFill # Create a new workbook workbook = openpyxl.Workbook() # Select the active sheet sheet = workbook.active # Set the background color of the third column to black fill = PatternFill(start_color=’000000′, end_color=’000000′, fill_type=’solid’) for cell …

Total answers: 1