All Questions
30 questions
2
votes
1
answer
93
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 ...
1
vote
1
answer
104
views
How to speed up the search for matching values in a second data frame in a line-by-line iteration over a first data frame?
I have a survey response dataframe for which each survey has a code:
df
...
3
votes
1
answer
295
views
Web scraping international trade data
I'm trying to scrape arrival data from this website. My script takes extremely long time to scrape the data. Is there any way I can speed up the scraping process?
Here's my script:
...
2
votes
1
answer
69
views
Resource reservation system
I'm using a function to determine if resources can be used again or not.
This is the numpy array I'm using.
...
3
votes
1
answer
121
views
Reddit bot in Python
I have created a Reddit bot that goes through an "x" amount of posts. For each post it pulls all the comments from that post into a list then a data frame and then it loops over a CSV look ...
8
votes
3
answers
2k
views
Priority based categorization using pandas/python
I have invoice and code data in the below Dataframes
Invoices
...
4
votes
1
answer
197
views
Multiple Pandas Ranking Operations within a Loop - Better Optimization and Performance
I have implemented the following code which works as intended. However, I would like to improve my code in terms of performance and efficiency
Code in Question
...
1
vote
1
answer
50
views
Pandas : Apply Merge operations from a column
I have a data frame, which contains three columns:
...
2
votes
0
answers
67
views
How can I shorten the runtime of my simulation?
Before you read the code below, note the following explanation:
I have three classes: Driver, Vehicle, and ...
6
votes
1
answer
124
views
Code optimisation: Converting dataframe to numpy's ndarray
I am working with a dataframe of over 21M rows.
...
1
vote
1
answer
223
views
Speeding up pandas apply
I would like to speed up pandas apply function. I have been using swifter . It currently takes about 5 mins for 200000 records using multiprocessing as below . Is there any way to speed this up ...
6
votes
1
answer
271
views
Match lists and get value of one column based on values of other columns from dataframe optimization
I have an input dataframe like below, where 'ID' is unique identifier, 'Signals_in_Group' is a derived field containing list of all unique 'Signal' column values present in a 'Group'. And '...
4
votes
1
answer
168
views
Code for wireless communication work
I need some pointers on how I can speed up my code, as of now it is incredible slow for larger inputs. The way the code works is that the file Loc_Circle_50U.txt contains the true locations of 50 ...
2
votes
1
answer
780
views
Building optimal portfolios for all combinations of stocks
Hi I recently wrote some code in python that does the following:
1.) Pulls stock closing data from yahoo finance for x number of stock
2.) finds all possible combinations of x stocks in groups of y ...
5
votes
2
answers
425
views
Loop through group and difference lags
I have time-series data (t) that I want to loop through each t and take the difference of the previous five lags ...