Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
240 views

Python using generators with Excelwriter - Performance

I'm looking to understand if my code has an obvious blockage or performance pain point that will cause it to operate slower or use more memory than it should. The current Excelfile i am processing ...
sayth's user avatar
  • 131
0 votes
2 answers
144 views

Optimize a Python code which indicates duplicated values in an excel file [closed]

I wrote this code to indicate duplicated values. It actually works but I hope to know if there's another possible solution to optimize this process. Thanks. ...
peternish's user avatar
1 vote
1 answer
139 views

Using Pandas to group data based on name and see if column value is greater than or equal to values based on group names

As you'll see from the below code, I'm creating separate data frames of a much larger data frame, then updating a column for each one. What I'm doing is looking at the second column and checking to ...
jp207's user avatar
  • 173
3 votes
1 answer
104 views

Python data entry into excel based on equality check with dataframe

My objective is to enter/type in values into Excel cells if the column names and indices match between Excel and dataframe. So, my code does the below Gets the ID values from the dataframe for each ...
The Great's user avatar
  • 247
3 votes
1 answer
355 views

Transposing an Excel sheet with pandas adding additional information for a different readability - Using Fake Pizzeria Data

The goal is to transpose the excel file that comes in the following form into this The code I created works properly, but I think it can be improved. I would also like to avoid using ...
Andrea Ciufo's user avatar
3 votes
1 answer
116 views

Load multiple worksheets from Excel file to multiple DataFrames

The spreadsheet can be found just above the references section at this link. https://www.sciencedirect.com/science/article/pii/S1872497316301429 It's a publication for STR DNA locus frequencies to ...
Dan's user avatar
  • 301
3 votes
1 answer
4k views

Python script for refreshing and preprocessing data in Excel report files

I wrote some code to create marketshare reports. However, I'm sure it can be improved. The tasks performed are: Open the global data file, refresh the data, import its content as a DF. Create a backup ...
currentlyunknown's user avatar
2 votes
1 answer
420 views

Finding matches in Excel files, adding to a Pandas Dataframe

I have a business requirement where I have to read excel files and match each cell with a given keyword list and find the matches and write it into a dataframe. I have written the code, but when the ...
Sankar's user avatar
  • 131
5 votes
1 answer
95 views

Fetch, plot, and send security incident statistics with Excel

TLDR: I don't develop for a living. If someone could point me in the right direction to make my script more readable/pythonic I would appreciate the assistance. In particular I'm struggling with the ...
ImNotLeet's user avatar
  • 161
3 votes
1 answer
4k views

Python: Combining Two Rows with Pandas read_excel

I am reading an Excel file using Pandas and I feel like there has to be a better way to handle the way I create column names. This is something like the Excel file I'm reading: ...
Virgilio's user avatar
4 votes
1 answer
950 views

Formatting Excel data into smaller pivot tables

The code below (Distribution.py) reads the results I get from a simulation I am running and formats them into smaller pivot tables. The data comes out as excel ...
Nobi's user avatar
  • 227
1 vote
1 answer
6k views

Convert Excel files to CSV

I wrote the following script to run through several excel files and format them before saving as a CSV for upload to a Quickbase app I'm creating. Each excel file is roughly 100k lines and the code ...
soren thomsen's user avatar
2 votes
1 answer
2k views

Writing data to an Excel sheet using openpyxl [closed]

I am currently writing a program to update and copy data from one spreadsheet to another. The code I have written works fine, but it takes way too long for it to be practical. In total, it takes about ...
Vishnu's user avatar
  • 21
3 votes
1 answer
116 views

Fetch and append player statistics to an Excel spreadsheet

I am a new programmer in python, and I need a bit of help to structure my code. ...
J.Doe's user avatar
  • 33
4 votes
1 answer
593 views

Data cleansing and formatting script

This is a script that creates a base dataframe from a sqlite database, adds data to it (also from SQLite), cleanse it and formats it all to an Excel file. I feel like it is incredibly verbose and my ...
metersk's user avatar
  • 389

15 30 50 per page