Đã hoàn thành

write some python code, very easy 5 minute job

I have a very small amount of python code that i need written. It should probably only take 5 minutes to write but I'm new to python so it would take me a lot longer. Here are some details.

I have a pandas dataframe, something like this one shown below:

league match_date team

Argentine Division 1 12/25/2022 272

Argentine Division 1 12/25/2022 272

Argentine Division 1 12/25/2022 272

Argentine Division 1 4/7/2022 272

Argentine Division 1 6/25/2022 272

Argentine Division 1 6/21/2022 272

Argentine Division 1 12/25/2022 283

Argentine Division 1 12/25/2022 283

Argentine Division 1 12/25/2022 283

Argentine Division 1 3/7/2022 283

Argentine Division 1 6/25/2022 283

Argentine Division 1 3/7/2022 299

Argentine Division 1 6/26/2022 299

Argentine Division 1 6/20/2022 299

I need to edit the dates in the match_date column using the following criteria:

if the match_date = 12/25/2022 then leave the match_date unchanged.

if the match_date != 12/25/2022 then subtract 7 days from the match_date above.

So the first date below the cell match_date = 12/25/2022 would become match_date = 12/18/2022.

Continue this for the remaining rows. So below the cell match_date = 12/18/2022 would be match_date = 12/11/2022 and below that would be match_date = 12/04/2022 etc.

However when the value in the last column 'team' changes, for instance from 272 to 283 or from 283 to 299, I want the process to start again subtracting 7 days from 12/25/2022 and not the cell above.

The dates should update from the dataframe on the left to the dataframe on the right:

league match_date team league match_date team

Argentine Division 1 12/25/2022 272 Argentine Division 1 12/25/2022 272

Argentine Division 1 12/25/2022 272 Argentine Division 1 12/25/2022 272

Argentine Division 1 12/25/2022 272 Argentine Division 1 12/25/2022 272

Argentine Division 1 4/7/2022 272 Argentine Division 1 12/18/2022 272

Argentine Division 1 6/25/2022 272 Argentine Division 1 12/11/2022 272

Argentine Division 1 6/21/2022 272 Argentine Division 1 12/4/2022 272

Argentine Division 1 12/25/2022 283 Argentine Division 1 12/25/2022 283

Argentine Division 1 12/25/2022 283 Argentine Division 1 12/25/2022 283

Argentine Division 1 12/25/2022 283 Argentine Division 1 12/25/2022 283

Argentine Division 1 3/7/2022 283 Argentine Division 1 12/18/2022 283

Argentine Division 1 6/25/2022 283 Argentine Division 1 12/11/2022 283

Argentine Division 1 3/7/2022 299 Argentine Division 1 12/18/2022 299

Argentine Division 1 6/26/2022 299 Argentine Division 1 12/11/2022 299

Argentine Division 1 6/20/2022 299 Argentine Division 1 12/4/2022 299

Kĩ năng: Python, Pandas, NumPy

Về khách hàng:
( 3 nhận xét ) London, United Kingdom

ID dự án: #34064317

Được trao cho:

(241 Đánh Giá)
6.2

25 freelancer chào giá trung bình£16 cho công việc này

oyasniy

Hi, I would like to help you with your Python pandas project. You can rely on me. I am an experienced developer and matematician. Looking forward to hear from you. Best regards, Oleg

£20 GBP trong 3 ngày
(29 Nhận xét)
5.9
mykhailodew

Hello? How are you? Thanks for posting this job. I am a Senior Python developer with 7+ years. I have been doing this kind of python projects many times. Please let me know. Best Regards

£15 GBP trong 1 ngày
(28 Nhận xét)
5.3
fosemav215

Hi there, I can edit your pandas dataframe as you wanted. ping me to get your work done. Thank you .

£15 GBP trong 1 ngày
(24 Nhận xét)
4.9
(22 Nhận xét)
5.0
touseefahmad37

Hi, I'm a Python Expert. I can manipulate the dates in the dataframe based on the the given condition. do contact me. Thank You

£12 GBP trong 1 ngày
(19 Nhận xét)
4.5
JaibhanSinghGaur

Greetings, I have gone through your project description. I find myself as a perfect fit for this job. I am working as a Python Developer from last 2 year. Some of my expertise is in the fields: 1. Web Scraping/Web Au Thêm

£10 GBP trong 1 ngày
(41 Nhận xét)
4.7
maksmyhalat

Hi, I hope you are well I read your project description and I found I can help you well. I have a lot of experiences in python, and R Programming. I read your description for project carefully. I will very happy if yo Thêm

£15 GBP trong 7 ngày
(19 Nhận xét)
4.3
(40 Nhận xét)
4.5
trostnickovo

Hi There, I Hope you are Doing Great !!! I have read your project and we have developed many python projects. I have 8+ years of experience in many engineering projects. I am a full stack developer experienced & skille Thêm

£15 GBP trong 7 ngày
(7 Nhận xét)
4.2
nguyentuan90

Hi, I've read your description carefully. I have full experience with python I've also worked on several similar projects. So I can complete your project with high quality on time. Looking forward to hear more about th Thêm

£15 GBP trong 1 ngày
(6 Nhận xét)
3.6
AlgerLincoln

Hello there, Could you please send me your data? It can be done with Pandas apply and loc methods and other ordinary methods. Contact me over chat to talk more about the details. I have +4 years of experience working Thêm

£15 GBP trong 2 ngày
(8 Nhận xét)
3.4
enigma78

Hi I have huge experience in Data analytics , machine learning using Python scripting using Pandas, Numpy

£15 GBP trong 1 ngày
(2 Nhận xét)
1.9
younlecras

Hello, Currently intern at the Friedrich Miescher Institute for Biomedical Research, I daily code in Python, R for our data analysis, We can tchat about it first, Cheers, Youn

£15 GBP trong 1 ngày
(2 Nhận xét)
1.4
nareshkum397

Hello I am naresh kumar experienced python developer. I have made so many projects using different libraries of python. I have worked alot using numpy and pandas so I can give you the best services in a very short of Thêm

£10 GBP trong 1 ngày
(2 Nhận xét)
1.0
tsvetchik

Hello Client, Hope you are doing Great. i can do it within 30 mins I have Very Good Knowledge and Experience in developing websites by using python,Django, flask, React, Angular. If you HIRE me, I will do my best to Thêm

£15 GBP trong 1 ngày
(1 Nhận xét)
0.8
tahaadeel41

write some python code, very easy 5 minute job Hello Patrick M., Hope you are doing great. I have read your project details. I have a great experience in Python. I am ready to start your project right now and I w Thêm

£10 GBP trong 7 ngày
(0 Nhận xét)
0.0
wilfrednjorog

Hey! I have vast experience in Python, NumPy and Pandas, and I am confident that I can produce quality content for you that will be of interest to your readers. I am available for a full-time writing position, and I a Thêm

£20 GBP trong 3 ngày
(0 Nhận xét)
0.0
igotmail9

Dear Sponsor, I have source code Python programs to connect to AWS, Raspberry Pi, Arduino. Hobbying with Raspberry Pi, Python and create Internet of Things - devices I am in middle of very big Agriculture automation w Thêm

£10 GBP trong 5 ngày
(0 Nhận xét)
0.0
jeremytay

Hello, Greetings!!! Highly Skilled and Experienced Python developer is here. ~~~~~~~~~~~~ I WILL SATISFY YOU~~~~~~~~~~~~ I will love to assist you with this task, and I can start working immediately. Kindly message m Thêm

£20 GBP trong 1 ngày
(0 Nhận xét)
0.0
ganeshb2012

Can we discuss this in detail.

£20 GBP trong 2 ngày
(0 Nhận xét)
0.0