Skip to main content

Questions tagged [pandas]

Pandas is a Python data analysis library.

4 votes
3 answers
84 views

I have a custom object which stores dataframes in memory given a certain hierarchy, and I want to store this data in a file while maintaining the hierarchy. This hierarchy involved parents, children, ...
Marcus Carpenter's user avatar
8 votes
3 answers
491 views

I have a comma-separated value (CSV) file as input, and I am supposed to interpolate all missing (nan) values based on neighboring non-diagonal values. The CSV ...
con's user avatar
  • 361
4 votes
2 answers
353 views

I want to calculate the quarterly average of a time-indexed dataframe column in a rolling fashion. The mean at any timestamp should not contain information about future timestamps. This is a code to ...
shamalaia's user avatar
  • 316
3 votes
3 answers
140 views

I have the following code to amend two rows of "test_base.csv" with the entries of the arrays "a_temp" and "b_temp," saving the result into "result.csv." .csv ...
Zachary's user avatar
  • 33
4 votes
1 answer
214 views

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
0 votes
1 answer
123 views

I have a dataset that contains 750,000 rows. I want to query each row and get the postcodes using the latitudes and longitudes. Problem: The code is executing very fast when I query like 100 rows, and ...
Buchi's user avatar
  • 1
1 vote
1 answer
105 views

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
  • 81
6 votes
2 answers
748 views

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
  • 81
2 votes
1 answer
58 views

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
2 votes
1 answer
253 views

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
3 votes
1 answer
296 views

I have the following data: ...
mahmoud988's user avatar
1 vote
1 answer
149 views

I am performing a sports prediction multi-class classification problem, and wanted to compare the differences in model performance between normalised and non-normalised data. You can see the 2 ...
pastybake2002's user avatar
3 votes
1 answer
245 views

I am trying to solve a multi-class classification involving prediction the outcome of a football match (target variable = Win, Lose or Draw). With a dataset of 2280 rows, which is 6 seasons of ...
pastybake2002's user avatar
3 votes
1 answer
89 views

Looking for a better approach to write below transformation using Python. Is it possible to avoid loop and still achieve the desired output? It is too slow for 10 million rows. ...
user278818's user avatar

15 30 50 per page
1
2 3 4 5
41