Cristian Tibrea Posted May 10 Share Posted May 10 Hello, I am trying to create a visual from my data to compare the duration for each well (how much it takes to drill). They don't start all at the same date, but when compare on the days duration I would like to have them starting from the same point (0 days). I have a screenshot with what I could accomplish but is not exactly what I want. For [Days] column, I used a python script as data function: EPOCH is 1sec data. import pandas as pd import numpy as np df = pd.DataFrame(WellslOpscomparison) days_time_list = [] time_zero = 0 for index, row in df.iterrows(): if row['OP_CLASS_DESC'] == 'Drilling': time_zero = row['EPOCH'] days_time_list.append(row['EPOCH'] - time_zero) Days_Time = pd.Series(days_time_list) Maybe this can be twitched a bit to get the desired result. Or, there is another way to do it. Any help is much appreciated Link to comment Share on other sites More sharing options...
Solution Olivier Keugue Tadaa Posted May 11 Solution Share Posted May 11 Hi Cristian I have created the attached dummy dataset and have obtained, like you, the below chart to start then add the following two calculated columns [day zero per well]. :::: first([Date]) over ([well]) [days duration]::: DateDiff('day',[day zero per well],[Date]) Display the chart by [days duration] I hope this helps solve your issue community_cases.xlsx Link to comment Share on other sites More sharing options...
Olivier Keugue Tadaa Posted May 11 Share Posted May 11 ... and the DXP if necessary community_cases - Sheet1.dxp Link to comment Share on other sites More sharing options...
Cristian Tibrea Posted May 13 Author Share Posted May 13 Thank you Olivier! It works great! Much appreciated! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now