Python and dataframe and datetime object

I want to create a new variable New_variable in the following dataset.

The rule for the New_variable is: if a consequential row started within 1 or less from any previous rows' Start or End variables' values, then it should have valued the same otherwise incrementally increases by 1.

Existing Data:

ID Start End New_variable

A 1 1 1

A 0.8 8 1

A 4 4 1

A 18 19 2

B 1 1 1

B 4 6 2

Next, when adding new observations, it also should have the same rule as above, but it should not change the previous New_variable-s values, but add consequentially even the Start value is smaller than the very first row of existing data's start value, see below the desired output.

New Data:

ID Start End

A -5 0

A 6 6

A 10 11

A 23 23

C 1 2

The desired output should be as below:

Existing and New Data:

ID Start End New_variable

A -5 0 3

A 1 1 1

A 0.8 8 1

A 4 4 1

A 6 6 1

A 10 11 4

A 18 19 2

A 23 23 5

B 1 1 1

B 4 6 2

C 1 2 1

Skills: Python, Software Architecture, Data Entry

See more: start data entry business, start data mining outsourcing business, start data entry outsourcing company, pandas remove time from datetime, pandas timestamp to datetime, pandas datetime to date, convert object to datetime python, python datetime, pandas datetime, pandas timestamp, pandas datetime format options, start data entry outsourcing business, start data entry projects, start data entry singapore, coldfusion convert xml datetime datetime object, jump start data entry, pay start data entry job, start data captcha process, start data capture proof reading online work immediately, start data entry excel business

About the Employer:
( 0 reviews ) Washington, United States

Project ID: #27852086

17 freelancers are bidding on average $121 for this job


Hi, Greetings! ✅checked your project details: Python and dataframe and datetime object ✅Completed Time: In project deadline We have worked on 600 + Projects. I have 6 + years of the experience in same kind of p More

$220 USD in 4 days
(331 Reviews)

✔️ Hi, There! I'm very confident of your project. I can complete your project in 1 day. I have 9 years of experience in python. Your job is what I'm most confident of. I can start your project right now. I'm a se More

$200 USD in 1 day
(89 Reviews)
(20 Reviews)

Hello I'm very interested in your project and can give the perfect result on time. I want to discuss further via chat. I can work immediately. Thanks

$140 USD in 1 day
(3 Reviews)

---- Pro python/Math/Algorithm Expert! -------- Hi, Dear Your project is very attracting my mind because I have rich experiences and high skills on this project. I have been completed many projects before and am worki More

$50 USD in 1 day
(8 Reviews)

Hi, there. I CAN START JUST NOW. I have got your project requirement enough. I am a creative and professional Python developer having more than 4+ years of professional experience as a senior developer in this field. More

$120 USD in 2 days
(5 Reviews)

Hi, I am Business Intelligence consultant with 5 years of professional work experience in multinational organizations and Masters in Data Analytics. Currently living in Saint Louis, MO, USA. I have expertise in Tablea More

$30 USD in 1 day
(9 Reviews)

Hi Dear, I read your description carefully. I understood what you require me to do and I am filled with confidence that I can complete your project wonderfully. I have experience over 5+ years with Python and etc. I en More

$160 USD in 1 day
(5 Reviews)

Hello Dear. I've read your description carefully. I can deliver your work on time, with high quality. I have full experience with C/C++/C#(ASP NET)/Python. more than 5 years. Please share more details about the job v More

$150 USD in 2 days
(6 Reviews)

Dear Sir! I've seriously went through your post and I have understood what you need. I am sure that I can be the best candidate who is able to perfectly complete this project Python and dataframe and datetime object. B More

$155 USD in 2 days
(2 Reviews)

✔Dear Client✔ I am a good experience in Python. I think I am a dedicated developer that satisfies your needs. I can help you with that and can start right away. If you hire me for this project, I will do my best for yo More

$100 USD in 1 day
(2 Reviews)

Hello Potential Client. I am a senior software engineer with over 10 years on experiences working independently and as a team member or leader. I have developed many web project with such as Algorithm and Python. I can More

$30 USD in 1 day
(3 Reviews)

Hi I can do it immediately Thanks ..............................................................................

$200 USD in 1 day
(1 Review)

Hi! I am an expert in Java, Python and C++. I would be easily able to help you regarding any task related to them. Kindly message me to discuss more details. Thank you!

$30 USD in 1 day
(3 Reviews)

Dear Client, How are you? I have checked your description and i can do it as you want I have good experience of python and data analysis So i am sure i can make it perfectly Looking forward to hearing from you soon Tha More

$140 USD in 3 days
(1 Review)

hey There, I have a 8 years of experiance in feild of software development and can help you with all types of python programs and script  which will be of professional standards I will cater to following but not limi More

$250 USD in 7 days
(5 Reviews)

hello sir/ma'am, I am a certified data scientist, I have experience of 6 months and many projects. If you have any questions or concerns please feel free to contact me at your [login to view URL] forward to hearing you More

$30 USD in 2 days
(0 Reviews)