Make Python Code blazing fast

Cancelado Publicado hace un año Pagado a la entrega
Cancelado Pagado a la entrega

Hello and thank you for your time. Please read the entire description and reach out if you have any questions.

So, I am in the process of building a model in Python and the entire file has about 1500 lines of codes and there are like 5 such files. I need help making these codes blazing fast. For the benefit of both you and me, I am sharing a sample code (test code) of a situation where I am dealing with a pandas dataframe that is at least 300,000 rows and 11 columns. I have a nested for loop to label the dataframe for each row in a new column.

The code is just 11 lines and I would like to see the performance comparison from your submission. Please note that this is a test job and based on the best submission I will move ahead with the full project. There is more work that these 5 files to be done too.

You are free to try eliminating for loops, using numpy vectorization, pandas vectorization but the end goal is to execute this blazing fast. For your reference the code is given below and sample data is also attached. Kindly submit your code and comparison times running the code as it is and your vectorized code for evaluation.

This is a test job so I am not paying anything for 11 lines of code. This is the evaluation criteria for the bigger project. I will be discussing timeline and costing once finalized.

Code -

for i in range(len(df) - timeframe):

calc = df['Close'].iloc[i] * (1 + percentage)

subset = df['Close'].iloc[i+1:i+timeframe+1]

if percentage < 0:

direction = 'short'

else:

direction = 'long'

for price in subset:

if (direction == 'long' and price >= calc) or (direction == 'short' and price <= calc):

df['label'].iloc[i] = 1

break

df = dataframe

percentage = variable (assign any value you want for trial)

timeframe = variable (assign any value you want for trial)

long and short = labels

Close = column in df

label = column in df (to be created)

Python Arquitectura de software NumPy Pandas Vectorización

Nº del proyecto: #36169729

Sobre el proyecto

14 propuestas Proyecto remoto Activo hace un año

14 freelancers están ofertando un promedio de $168 por este trabajo

merinsinha

Python expert. I can do it. As 9+ years experiences in these field. I can give good quality work. I have read the guidelines of your work.I believe that i can provide you the best quality works you are anticipating fro Más

$205 CAD en 3 días
(89 comentarios)
5.8
rashidamjad

Hi there, How are you? I have gone through your project details. I would like to tell you that l have a great bunch of experience in Vectorization, Python, NumPy, Pandas and Software Architecture. For that I would req Más

$175 CAD en 16 días
(10 comentarios)
5.0
sybacdesigner

Hi. How are you? I have just read your proposal and I am sure I can complete the project on time. I am a mathematician who has 15 years of experiences in Numerical Analysis using Matlab/Python, .... Please contact me Más

$100 CAD en 1 día
(14 comentarios)
4.9
anaya8777

Hello! I will make python code fast. I assure you to deliver high-quality work with a fast turnaround. Looking forward to hearing from you. Regards Munish Gupta.

$155 CAD en 3 días
(11 comentarios)
4.7
KawlCarter

✅ Full Experiences and Profound Knowledge in ⭐Data Processing with Python Programming⭐✅. Hi, how are you? I am very confident to complete your project perfectly. I can start your work right now. Of course, since I am n Más

$100 CAD en 1 día
(17 comentarios)
4.5
programmingarena

Hi, Dear Employer, I am interested in your project – “Make Python Code blazing fast”. I have read your whole Project description carefully and understand your requirements well. Now I can say with confident that I can Más

$100 CAD en 2 días
(15 comentarios)
3.8
SabirLashari

hi I'm professional electrical engineer and I have sound knowledge about it so please text me over chat to discuss further this bid is negotiable we can discuss about deadline and budget

$155 CAD en 7 días
(2 comentarios)
2.6
yelenauniya

Hi. I am a python epert. I have just read your detail carefully and I can make python code perfectly. I am really interested in your project. I have 9+ years experience doing similar jobs related to these skills Python Más

$150 CAD en 3 días
(1 comentario)
2.8
malkesh3m

⭐⭐⭐ Hi, My availability: Immediate. I read your project post of Python Developer. I am Python developer with skill sets in - Python, Django, Flask, jupyter notebook - Data Science - SQlAlchemy, PostegresDB, MySQL, Sq Más

$200 CAD en 3 días
(8 comentarios)
3.2
ishanagrawal1101

Hello, I am a python developer with over 5+ years of experience i can help resolve your this issue in very efficient way.

$155 CAD en 3 días
(0 comentarios)
0.0
prateekjain6342

I am a 4+ Years experienced Python Professional working in the domain of Data Science and Analytics along with experience in Fintech, E-COmmerce, FMCG and more. I believe I'd be able to solve your issue and get you th Más

$300 CAD en 7 días
(0 comentarios)
0.0