Creating rows as per duration using datetime pandas
I am facing an issue to write a code using datetime. I had created a scenario I am working on. Can someone help me out on the code.
Input:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
Joseph, B, 3, 15:05:00
Output:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
John, A, 2, 16:01:00
Joseph, B, 3, 15:05:00
Joseph, B, 3, 15:06:00
Joseph, B, 3, 15:07:00
Thank you in advance.
enter image description here
python pandas datetime timedelta
add a comment |
I am facing an issue to write a code using datetime. I had created a scenario I am working on. Can someone help me out on the code.
Input:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
Joseph, B, 3, 15:05:00
Output:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
John, A, 2, 16:01:00
Joseph, B, 3, 15:05:00
Joseph, B, 3, 15:06:00
Joseph, B, 3, 15:07:00
Thank you in advance.
enter image description here
python pandas datetime timedelta
add a comment |
I am facing an issue to write a code using datetime. I had created a scenario I am working on. Can someone help me out on the code.
Input:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
Joseph, B, 3, 15:05:00
Output:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
John, A, 2, 16:01:00
Joseph, B, 3, 15:05:00
Joseph, B, 3, 15:06:00
Joseph, B, 3, 15:07:00
Thank you in advance.
enter image description here
python pandas datetime timedelta
I am facing an issue to write a code using datetime. I had created a scenario I am working on. Can someone help me out on the code.
Input:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
Joseph, B, 3, 15:05:00
Output:
Name, Channel, Duration, Start_time
John, A, 2, 16:00:00
John, A, 2, 16:01:00
Joseph, B, 3, 15:05:00
Joseph, B, 3, 15:06:00
Joseph, B, 3, 15:07:00
Thank you in advance.
enter image description here
python pandas datetime timedelta
python pandas datetime timedelta
edited Nov 19 '18 at 6:40
Vivek Kalyanarangan
5,0361827
5,0361827
asked Nov 19 '18 at 6:39
Srikanth AyithySrikanth Ayithy
83
83
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Use:
df['Start_time'] = pd.to_timedelta(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 16:00:00
1 John A 2 16:01:00
2 Joseph B 3 15:05:00
3 Joseph B 3 15:06:00
4 Joseph B 3 15:07:00
Explanation:
- Firt convert column
Start_timeto_timedelta
- Then
repeatvalues of index by columnDurationand repeat rows byloc
- Create counter by
cumcountper index values and convert it to 1 minute timedeltas, which are added to new repeated columnStart_time
- Last
reset_indexwith parameterdrop=Truefor avoid duplicated index values
EDIT:
If want datetimes in output solution is same, only first convert values to_datetime:
df['Start_time'] = pd.to_datetime(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 2018-11-19 16:00:00
1 John A 2 2018-11-19 16:01:00
2 Joseph B 3 2018-11-19 15:05:00
3 Joseph B 3 2018-11-19 15:06:00
4 Joseph B 3 2018-11-19 15:07:00
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
|
show 1 more comment
Use -
df['dates'] = df.apply(lambda x: list(pd.date_range(start=x['Start_time'], periods=x['Duration'], freq='1min')), axis=1)
df.set_index(['Name','Channel','Duration', 'Start_time'])['dates'].apply(pd.Series).stack().reset_index().drop(['level_4','Start_time'],1).rename(columns={0:'Start_time'})
Output
Name Channel Duration Start_time
0 John A 3 2018-11-19 16:00:00
1 John A 3 2018-11-19 16:01:00
2 John A 3 2018-11-19 16:02:00
3 Joseph B 4 2018-11-19 15:05:00
4 Joseph B 4 2018-11-19 15:06:00
5 Joseph B 4 2018-11-19 15:07:00
6 Joseph B 4 2018-11-19 15:08:00
Explanation
- Apply
pd.date_range()toStart_timeandDuration
- explode that into a
dfwith the second line
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53369488%2fcreating-rows-as-per-duration-using-datetime-pandas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use:
df['Start_time'] = pd.to_timedelta(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 16:00:00
1 John A 2 16:01:00
2 Joseph B 3 15:05:00
3 Joseph B 3 15:06:00
4 Joseph B 3 15:07:00
Explanation:
- Firt convert column
Start_timeto_timedelta
- Then
repeatvalues of index by columnDurationand repeat rows byloc
- Create counter by
cumcountper index values and convert it to 1 minute timedeltas, which are added to new repeated columnStart_time
- Last
reset_indexwith parameterdrop=Truefor avoid duplicated index values
EDIT:
If want datetimes in output solution is same, only first convert values to_datetime:
df['Start_time'] = pd.to_datetime(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 2018-11-19 16:00:00
1 John A 2 2018-11-19 16:01:00
2 Joseph B 3 2018-11-19 15:05:00
3 Joseph B 3 2018-11-19 15:06:00
4 Joseph B 3 2018-11-19 15:07:00
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
|
show 1 more comment
Use:
df['Start_time'] = pd.to_timedelta(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 16:00:00
1 John A 2 16:01:00
2 Joseph B 3 15:05:00
3 Joseph B 3 15:06:00
4 Joseph B 3 15:07:00
Explanation:
- Firt convert column
Start_timeto_timedelta
- Then
repeatvalues of index by columnDurationand repeat rows byloc
- Create counter by
cumcountper index values and convert it to 1 minute timedeltas, which are added to new repeated columnStart_time
- Last
reset_indexwith parameterdrop=Truefor avoid duplicated index values
EDIT:
If want datetimes in output solution is same, only first convert values to_datetime:
df['Start_time'] = pd.to_datetime(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 2018-11-19 16:00:00
1 John A 2 2018-11-19 16:01:00
2 Joseph B 3 2018-11-19 15:05:00
3 Joseph B 3 2018-11-19 15:06:00
4 Joseph B 3 2018-11-19 15:07:00
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
|
show 1 more comment
Use:
df['Start_time'] = pd.to_timedelta(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 16:00:00
1 John A 2 16:01:00
2 Joseph B 3 15:05:00
3 Joseph B 3 15:06:00
4 Joseph B 3 15:07:00
Explanation:
- Firt convert column
Start_timeto_timedelta
- Then
repeatvalues of index by columnDurationand repeat rows byloc
- Create counter by
cumcountper index values and convert it to 1 minute timedeltas, which are added to new repeated columnStart_time
- Last
reset_indexwith parameterdrop=Truefor avoid duplicated index values
EDIT:
If want datetimes in output solution is same, only first convert values to_datetime:
df['Start_time'] = pd.to_datetime(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 2018-11-19 16:00:00
1 John A 2 2018-11-19 16:01:00
2 Joseph B 3 2018-11-19 15:05:00
3 Joseph B 3 2018-11-19 15:06:00
4 Joseph B 3 2018-11-19 15:07:00
Use:
df['Start_time'] = pd.to_timedelta(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 16:00:00
1 John A 2 16:01:00
2 Joseph B 3 15:05:00
3 Joseph B 3 15:06:00
4 Joseph B 3 15:07:00
Explanation:
- Firt convert column
Start_timeto_timedelta
- Then
repeatvalues of index by columnDurationand repeat rows byloc
- Create counter by
cumcountper index values and convert it to 1 minute timedeltas, which are added to new repeated columnStart_time
- Last
reset_indexwith parameterdrop=Truefor avoid duplicated index values
EDIT:
If want datetimes in output solution is same, only first convert values to_datetime:
df['Start_time'] = pd.to_datetime(df['Start_time'])
df = df.loc[df.index.repeat(df['Duration'])]
td = pd.to_timedelta(df.groupby(level=0).cumcount() * 60, unit='s')
df['Start_time'] = df['Start_time'] + td
df = df.reset_index(drop=True)
print (df)
Name Channel Duration Start_time
0 John A 2 2018-11-19 16:00:00
1 John A 2 2018-11-19 16:01:00
2 Joseph B 3 2018-11-19 15:05:00
3 Joseph B 3 2018-11-19 15:06:00
4 Joseph B 3 2018-11-19 15:07:00
edited Nov 19 '18 at 7:16
answered Nov 19 '18 at 6:42
jezraeljezrael
329k23271350
329k23271350
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
|
show 1 more comment
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
Brilliant. This worked like a stunner. Thank you very much man..... :)
– Srikanth Ayithy
Nov 19 '18 at 9:23
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
@SrikanthAyithy - You are welcome! If my answer was helpful, don't forget accept it. Thanks.
– jezrael
Nov 19 '18 at 9:24
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
Thank you very much for the previous answer. Need one more small help. If I have to summarize the input data i mentioned into half an hour bands. Like my output looks-like, Name, Channel, Duration, Timeband, Duration, count John, A, 2, 16:00:00-16:30:00 1 Joseph, B, 3, 15:00:00-15:30:00 1................... We may face an issue when we summarize a row with duration 10 watching which will split between bands like 5 minutes in 15:00:00-15:30:00 and other 5 minutes in 15:30:00-16:00:00.
– Srikanth Ayithy
Nov 19 '18 at 10:02
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
@SrikanthAyithy - Only one answer should be accepting, can you check it?
– jezrael
Nov 19 '18 at 10:15
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
Done! I accepted your answer.
– Srikanth Ayithy
Nov 19 '18 at 10:21
|
show 1 more comment
Use -
df['dates'] = df.apply(lambda x: list(pd.date_range(start=x['Start_time'], periods=x['Duration'], freq='1min')), axis=1)
df.set_index(['Name','Channel','Duration', 'Start_time'])['dates'].apply(pd.Series).stack().reset_index().drop(['level_4','Start_time'],1).rename(columns={0:'Start_time'})
Output
Name Channel Duration Start_time
0 John A 3 2018-11-19 16:00:00
1 John A 3 2018-11-19 16:01:00
2 John A 3 2018-11-19 16:02:00
3 Joseph B 4 2018-11-19 15:05:00
4 Joseph B 4 2018-11-19 15:06:00
5 Joseph B 4 2018-11-19 15:07:00
6 Joseph B 4 2018-11-19 15:08:00
Explanation
- Apply
pd.date_range()toStart_timeandDuration
- explode that into a
dfwith the second line
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
add a comment |
Use -
df['dates'] = df.apply(lambda x: list(pd.date_range(start=x['Start_time'], periods=x['Duration'], freq='1min')), axis=1)
df.set_index(['Name','Channel','Duration', 'Start_time'])['dates'].apply(pd.Series).stack().reset_index().drop(['level_4','Start_time'],1).rename(columns={0:'Start_time'})
Output
Name Channel Duration Start_time
0 John A 3 2018-11-19 16:00:00
1 John A 3 2018-11-19 16:01:00
2 John A 3 2018-11-19 16:02:00
3 Joseph B 4 2018-11-19 15:05:00
4 Joseph B 4 2018-11-19 15:06:00
5 Joseph B 4 2018-11-19 15:07:00
6 Joseph B 4 2018-11-19 15:08:00
Explanation
- Apply
pd.date_range()toStart_timeandDuration
- explode that into a
dfwith the second line
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
add a comment |
Use -
df['dates'] = df.apply(lambda x: list(pd.date_range(start=x['Start_time'], periods=x['Duration'], freq='1min')), axis=1)
df.set_index(['Name','Channel','Duration', 'Start_time'])['dates'].apply(pd.Series).stack().reset_index().drop(['level_4','Start_time'],1).rename(columns={0:'Start_time'})
Output
Name Channel Duration Start_time
0 John A 3 2018-11-19 16:00:00
1 John A 3 2018-11-19 16:01:00
2 John A 3 2018-11-19 16:02:00
3 Joseph B 4 2018-11-19 15:05:00
4 Joseph B 4 2018-11-19 15:06:00
5 Joseph B 4 2018-11-19 15:07:00
6 Joseph B 4 2018-11-19 15:08:00
Explanation
- Apply
pd.date_range()toStart_timeandDuration
- explode that into a
dfwith the second line
Use -
df['dates'] = df.apply(lambda x: list(pd.date_range(start=x['Start_time'], periods=x['Duration'], freq='1min')), axis=1)
df.set_index(['Name','Channel','Duration', 'Start_time'])['dates'].apply(pd.Series).stack().reset_index().drop(['level_4','Start_time'],1).rename(columns={0:'Start_time'})
Output
Name Channel Duration Start_time
0 John A 3 2018-11-19 16:00:00
1 John A 3 2018-11-19 16:01:00
2 John A 3 2018-11-19 16:02:00
3 Joseph B 4 2018-11-19 15:05:00
4 Joseph B 4 2018-11-19 15:06:00
5 Joseph B 4 2018-11-19 15:07:00
6 Joseph B 4 2018-11-19 15:08:00
Explanation
- Apply
pd.date_range()toStart_timeandDuration
- explode that into a
dfwith the second line
answered Nov 19 '18 at 7:11
Vivek KalyanaranganVivek Kalyanarangan
5,0361827
5,0361827
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
add a comment |
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
This is working too. However, results are going into one row.
– Srikanth Ayithy
Nov 19 '18 at 10:21
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53369488%2fcreating-rows-as-per-duration-using-datetime-pandas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown