Vectorizing Loop-based Time-Series Algorithm

进行中 已发布的 3 天前 货到付款
进行中 货到付款

### Task Overview:

I need a **Pandas DataFrame expert** to **vectorize a loop-based algorithm** for time-series data. The task involves complex calculations to eliminate the need for Python loops, ensuring the solution is efficient and fast.

---

### DataFrame Details:

The DataFrame contains the following columns:

- `used_res` (Resource Used)

- `res_cap` (Resource Capacity)

- `qty` (Quantity)

---

### Algorithm Requirements:

1. **Step 1: Calculate Desired Quantity**

- Compute the percentage:

`percent_used = used_res / res_cap`

- If `percent_used > target_value` (a static threshold variable), calculate `desired_qty` using the formula:

```python

desired_qty = ceil(qty * (percent_used / target_value))

```

- Store the result in a new column: `desired_qty`.

2. **Step 2: Update Quantities Based on Conditions**

- Create another column: `updated_qty`.

- Logic for updating:

- If `desired_qty[index] > desired_qty[index - 1]`, then:

```python

updated_qty[index + 10] = desired_qty[index]

```

- If `desired_qty[index] <= desired_qty[index - 1]`, then:

```python

updated_qty[index + 5] = desired_qty[index]

```

- Ensure this is handled without using loops, `iterrows`, or `itertuples`. The entire process must be vectorized for performance.

---

### Deliverables:

1. A Python function/script implementing the vectorized solution using Pandas.

2. Verify correctness by ensuring the output matches the provided "before" and "after" CSV files.

3. Provide clean, well-documented, and maintainable code.

---

### Notes:

- The solution **must not use loops** or row-based iteration functions like `iterrows` or `itertuples`. Efficiency is critical.

- Use Pandas vectorization techniques and NumPy functions where appropriate.

Python Pandas 数据科学

项目ID: #38949947

关于项目

57个方案 远程项目 活跃的9 小时前

授予:

(38条评论)
5.3

有57名威客正在参与此工作的竞标,均价$126/小时

LiveExperts

Hi there,I'm biddin on your project "Vectorizing Loop-based Time-Series Algorithm" I have read your project description and i'm an expert in Python and machine learning therefore i can do this project for you perfectly 更多

$250USD 在1天里
(31条评论)
7.2
ThanassisKalv

Hello, I have a lot of experience in heavily optimizing Python codes with Pandas' lambdas, it's indeed a very effective way to avoid the Python very slow loops.... and I have done such with a variety of algorithms. Eve 更多

$130 USD 在3天内
(133条评论)
6.8
singhaditya5842

Hello, I see that you want to remove the looping part in the second part and I can remove it using the vectorization concept of numpy/dataframe/series which is more efficient. Can you share the 2nd step exact logic wit 更多

$150 USD 在2天内
(11条评论)
6.2
ashrafsbai6655

Hi there, I checked your requirements and guarantee you that i have relevant experience in Python,ml and data science it's gonna be done within the highest quality . Let's contact via chat so that I can start work imme 更多

$135USD 在1天里
(38条评论)
5.6
rashidamjad

Hello Jason, I appreciate the opportunity to assist with your project involving vectorizing a loop-based time-series algorithm using Pandas. With over 5 years of experience in Python and extensive expertise in data ma 更多

$250 USD 在8天内
(12条评论)
5.6
mubeenm5026

With over a decade of experience in web and mobile development, I bring a unique perspective to the task of vectorizing your loop-based time-series algorithm. My expert skills in Python, especially with Pandas and NumP 更多

$140 USD 在7天内
(2条评论)
5.2
Feriver

Hello, my name is Asif, and I specialize in optimizing data processing tasks using Pandas and NumPy. With experience in working with large time-series datasets, I can help you vectorize your loop-based algorithm for ef 更多

$250 USD 在2天内
(27条评论)
5.3
gm341473

With my extensive experience in Python and deep understanding of Pandas, I am confident I can excel at your task of vectorizing the loop-based time-series algorithm for your given dataset. I not only have strong comman 更多

$140 USD 在2天内
(23条评论)
5.3
edulov

Hello. Formally, this task is doable, but it resembles academic assignment made by a regular lecturer, since he/she doesn't understand how Pandas work and why it is inefficient. I know how to do it faster not using st 更多

$120 USD 在4天内
(9条评论)
5.3
KolmanOuassou

Hi, I am a data analyst/statistician and Economist with more than 6 years of experience. I can do your project, Please take time to check my profile and then you decide to contact me.

$100 USD 在3天内
(18条评论)
5.2
GdevDataSceince

Hi there, I am a data scientist and a professional responsible for extracting actionable insights and knowledge from large volumes of data. As an experienced Data Scientist in machine learning, I am highly proficient i 更多

$140 USD 在3天内
(25条评论)
5.5
JustinJcob

Hi Thank you for the opportunity to bid on your project. An experienced Pandas DataFrame specialist, I am ready to start right now to optimize your loop-based algorithm for efficient time-series data processing. By i 更多

$140 USD 在7天内
(7条评论)
4.6
urmate

Hi there, I have carefully reviewed the description of your project and am confident in my ability to support and complete it with 100% accuracy and efficiency. With strong programming and development expertise, I bri 更多

$140 USD 在3天内
(33条评论)
4.7
Muhammadzeesha59

Hello Sir/MAM I am a skilled full stack developer. Having rich experience in Java , C++ , C , C# , Python , Eclipse , Sql , Mysql , .Net ,Oracle , Object Oriented Programming , Data Structure 更多

$140 USD 在2天内
(21条评论)
5.0
trm66614

Hi there,Good afternoon I am Talha. I can work with your project skills Pandas, Python and Data Science am writing to propose an innovative approach to tackle your project. Our proposal centers on delivering creativ 更多

$120 USD 在7天内
(5条评论)
4.6
TheRSTeam

Hi, I'm a data analyst, statistician, and economist with over six years of experience. I understand the requirements of your project and have the skills to deliver high-quality results. To better tailor my approach, 更多

$80 USD 在2天内
(16条评论)
4.8
abhishek2chikun

Hi Jason, I am a Data Scientist and have expertise in developing algorithms, data processing, and optimizing workflows using Pandas, NumPy, and other tools. Implementation Approach: - Analyze the dataset and require 更多

$150USD 在1天里
(9条评论)
4.4
stheven19

With over five years of mastery in Excel and VBA, I bring a unique skill set to your data project. As a **freelance Excel & VBA expert**, my specialized knowledge extends to automating repetitive processes and developi 更多

$140USD 在1天里
(8条评论)
3.7
redstone2409

We specialize in web development and data solutions. We understand the importance of optimizing algorithms for performance and scalability, particularly for time-series data. We are confident in our ability to help you 更多

$250 USD 在7天内
(2条评论)
3.6
rajat23091969

Hello jsonmwork, I am Rajat, a versatile developer with expertise in various programming languages, including Python. Your project on vectorizing a loop-based time-series algorithm using Pandas intrigues me. With my e 更多

$175 USD 在3天内
(7条评论)
4.1