Skip to main content

All Questions

Tagged with
4 votes
1 answer
195 views

Finding specific promotions from two columns [closed]

I'm trying to build a function that identifies those who are promoted into a list of jobcodes, or are promoted within that list of jobcodes. Initially I was using ...
Gage's user avatar
  • 41
1 vote
1 answer
83 views

Replace iterrow loops in pandas matrices with something else to shorten the running time

This post is modified from this one: https://codereview.stackexchange.com/posts/292885/edit (Alternatives to iterrow loops in python pandas dataframes). I have a piece of code to calculate price ...
Laura's user avatar
  • 91
7 votes
2 answers
693 views

Alternatives to iterrow loops in python pandas dataframes

I have a piece of code to calculate price sensitivity based on the product and its rating. Below is the original data set with product type, reported year, customer’s rating, price per unit, and ...
Laura's user avatar
  • 91
2 votes
1 answer
46 views

Maintain a log containing values if certain conditions are met

I'm trying to capture profits and set a stop loss in my trading strategy. I want the stop loss to be set daily based on the past data and if the current price, i.e., price for the date falls below the ...
driver's user avatar
  • 222
0 votes
2 answers
133 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
2 votes
1 answer
185 views

Is this the right implementation for Linear Programming (puLP) on python?

I have created a LP function to help maximize a set of features. My first time playing with this library and also conducting LP. Variables: Number of features => X Number of Categories => Y ...
Kale 's user avatar
  • 23
1 vote
0 answers
57 views

Recurrent Neural Network loss is NAN

I am training a neural network to use approximately 600 features (4103rd to last column of a df) to predict approximately 4000 values (7th to 4102nd column of the same df). I have standardized the ...
Manas Garg's user avatar
1 vote
0 answers
51 views

BoundingBox dataclass implementation with cupy, cudf, and nvector

The dataset I'm working with is rather large so I've been experimenting with cudf and cupy. Here you can find instructions for ...
Jason Leaver's user avatar
3 votes
2 answers
202 views

Intercolumn statistics between columns in a dataframe

I have a df and need to count how many adjacent columns have the same sign as other columns based on the sign of the first column, and multiply by the sign of the ...
jaried's user avatar
  • 177
2 votes
0 answers
235 views

Do Mann-Kendall and Pettitt tests on each CSV file

Here is a function that will take each text file in a directory, do the Mann-Kendall and Pettitt tests, and then write the output to a text file. Would you please suggest me improve the code to make ...
Geoge Cittal's user avatar
1 vote
1 answer
79 views

Generate new column based on two columns of dataframe

I need to generate column a_b based on column a and column b of ...
jaried's user avatar
  • 177
1 vote
1 answer
79 views

Stacking Z axis on multiple [1440x720] DataFrames (X, Y)

Each datum represents a point in a 1440x720 image of the globe, The values are 0-9. Each new layer is of a higher elevation. I need to structure a DataFrame in a ...
Jason Leaver's user avatar
2 votes
1 answer
192 views

type hinting/documenting/extension of a Cython lib

I've updated some of the type hinting/documentation in a lib called pygrib. The source documentation can be found here. The goal is to extend the ...
Jason Leaver's user avatar
2 votes
1 answer
78 views

dataframe mean outliers to NaN to derive a higher quality mean for area,speed,azimuth

I have some data that represents the area, speed(meters per second), and azimuth(rads) of a polygon. The objective is to determine the mean for each set of parameters. With that mean value, apply a ...
Jason Leaver's user avatar
3 votes
1 answer
231 views

pandas dataframe of temps and numpy.linalg.lstsq

The problem is this. Forecast model data indicates at 0700Z the 1000 milibar temps will be -4C°. The forecaster knows that is incorrect, so they choose to make a correction. This correction should ...
Jason Leaver's user avatar

15 30 50 per page
1
2 3 4 5 6