applying row-wise function in a data frame with values of another data frame
I have two data frames:
df1
df1 = pd.DataFrame( 'group' : ["A","A","A","B","B","B"],
'par' : [5,5,15,10,2,11],
'val' :[50,10,180,10,10,660],
'set_0' :["Country","Country","Country","Country","Country","Country"],
'set_1' :["size1","size1","size2","size3","size4","size3"],
'set_2' :["size12","size12","size12","size9","size13","size13"],
'set_3' :["size14","size14","size15","NO","NO","NO"],
'set_4' :["NO","NO","NO","size25","size25","size27"],
'set_5' :["NO","NO","NO","NO","NO","NO"]
)
df2
df2 = pd.DataFrame( 'group' : ["A","A","A","A","A","A","B","B","B","B","B","B","B"],
'set' : ["Country","size1","size2","size12","size14","size15","Country","size3","size4","size9","size13","size25","size27"],
)
For each row (group X set combination) of df2, I want to apply a function to calculate (sum of "val"/sum of "par").
I tried to use something with apply function but I could not really figure out since I am pretty new in python.
Could anyone please help regarding a solution?
below is the expected outcome:

As image upload keeps failing, I am also sharing below the code to get the outcome in the ugliest and most inefficient hardcoding way:
a1=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["val"]
a2=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["par"]
b1=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["val"]
b2=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["par"]
c1=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["val"]
c2=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["par"]
d1=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["val"]
d2=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["par"]
e1=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["val"]
e2=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["par"]
f1=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["val"]
f2=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["par"]
g1=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["val"]
g2=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["par"]
h1=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["val"]
h2=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["par"]
j1=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["val"]
j2=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["par"]
k1=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["val"]
k2=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["par"]
l1=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["val"]
l2=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["par"]
m1=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["val"]
m2=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["par"]
n1=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["val"]
n2=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["par"]
Up to this part, I had to manually create "val" and "par" pairs for each element.
Then,
a=a1/a2
b=b1/b2
c=c1/c2
d=d1/d2
e=e1/e2
f=f1/f2
g=g1/g2
h=h1/h2
j=j1/j2
k=k1/k2
l=l1/l2
m=m1/m2
n=n1/n2
Finally, the result is:
df2["desired_calculation"]=[a,b,c,d,e,f,g,h,j,k,l,m,n]
python-3.x function apply
add a comment |
I have two data frames:
df1
df1 = pd.DataFrame( 'group' : ["A","A","A","B","B","B"],
'par' : [5,5,15,10,2,11],
'val' :[50,10,180,10,10,660],
'set_0' :["Country","Country","Country","Country","Country","Country"],
'set_1' :["size1","size1","size2","size3","size4","size3"],
'set_2' :["size12","size12","size12","size9","size13","size13"],
'set_3' :["size14","size14","size15","NO","NO","NO"],
'set_4' :["NO","NO","NO","size25","size25","size27"],
'set_5' :["NO","NO","NO","NO","NO","NO"]
)
df2
df2 = pd.DataFrame( 'group' : ["A","A","A","A","A","A","B","B","B","B","B","B","B"],
'set' : ["Country","size1","size2","size12","size14","size15","Country","size3","size4","size9","size13","size25","size27"],
)
For each row (group X set combination) of df2, I want to apply a function to calculate (sum of "val"/sum of "par").
I tried to use something with apply function but I could not really figure out since I am pretty new in python.
Could anyone please help regarding a solution?
below is the expected outcome:

As image upload keeps failing, I am also sharing below the code to get the outcome in the ugliest and most inefficient hardcoding way:
a1=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["val"]
a2=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["par"]
b1=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["val"]
b2=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["par"]
c1=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["val"]
c2=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["par"]
d1=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["val"]
d2=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["par"]
e1=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["val"]
e2=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["par"]
f1=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["val"]
f2=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["par"]
g1=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["val"]
g2=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["par"]
h1=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["val"]
h2=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["par"]
j1=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["val"]
j2=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["par"]
k1=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["val"]
k2=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["par"]
l1=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["val"]
l2=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["par"]
m1=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["val"]
m2=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["par"]
n1=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["val"]
n2=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["par"]
Up to this part, I had to manually create "val" and "par" pairs for each element.
Then,
a=a1/a2
b=b1/b2
c=c1/c2
d=d1/d2
e=e1/e2
f=f1/f2
g=g1/g2
h=h1/h2
j=j1/j2
k=k1/k2
l=l1/l2
m=m1/m2
n=n1/n2
Finally, the result is:
df2["desired_calculation"]=[a,b,c,d,e,f,g,h,j,k,l,m,n]
python-3.x function apply
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58
add a comment |
I have two data frames:
df1
df1 = pd.DataFrame( 'group' : ["A","A","A","B","B","B"],
'par' : [5,5,15,10,2,11],
'val' :[50,10,180,10,10,660],
'set_0' :["Country","Country","Country","Country","Country","Country"],
'set_1' :["size1","size1","size2","size3","size4","size3"],
'set_2' :["size12","size12","size12","size9","size13","size13"],
'set_3' :["size14","size14","size15","NO","NO","NO"],
'set_4' :["NO","NO","NO","size25","size25","size27"],
'set_5' :["NO","NO","NO","NO","NO","NO"]
)
df2
df2 = pd.DataFrame( 'group' : ["A","A","A","A","A","A","B","B","B","B","B","B","B"],
'set' : ["Country","size1","size2","size12","size14","size15","Country","size3","size4","size9","size13","size25","size27"],
)
For each row (group X set combination) of df2, I want to apply a function to calculate (sum of "val"/sum of "par").
I tried to use something with apply function but I could not really figure out since I am pretty new in python.
Could anyone please help regarding a solution?
below is the expected outcome:

As image upload keeps failing, I am also sharing below the code to get the outcome in the ugliest and most inefficient hardcoding way:
a1=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["val"]
a2=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["par"]
b1=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["val"]
b2=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["par"]
c1=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["val"]
c2=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["par"]
d1=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["val"]
d2=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["par"]
e1=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["val"]
e2=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["par"]
f1=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["val"]
f2=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["par"]
g1=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["val"]
g2=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["par"]
h1=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["val"]
h2=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["par"]
j1=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["val"]
j2=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["par"]
k1=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["val"]
k2=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["par"]
l1=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["val"]
l2=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["par"]
m1=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["val"]
m2=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["par"]
n1=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["val"]
n2=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["par"]
Up to this part, I had to manually create "val" and "par" pairs for each element.
Then,
a=a1/a2
b=b1/b2
c=c1/c2
d=d1/d2
e=e1/e2
f=f1/f2
g=g1/g2
h=h1/h2
j=j1/j2
k=k1/k2
l=l1/l2
m=m1/m2
n=n1/n2
Finally, the result is:
df2["desired_calculation"]=[a,b,c,d,e,f,g,h,j,k,l,m,n]
python-3.x function apply
I have two data frames:
df1
df1 = pd.DataFrame( 'group' : ["A","A","A","B","B","B"],
'par' : [5,5,15,10,2,11],
'val' :[50,10,180,10,10,660],
'set_0' :["Country","Country","Country","Country","Country","Country"],
'set_1' :["size1","size1","size2","size3","size4","size3"],
'set_2' :["size12","size12","size12","size9","size13","size13"],
'set_3' :["size14","size14","size15","NO","NO","NO"],
'set_4' :["NO","NO","NO","size25","size25","size27"],
'set_5' :["NO","NO","NO","NO","NO","NO"]
)
df2
df2 = pd.DataFrame( 'group' : ["A","A","A","A","A","A","B","B","B","B","B","B","B"],
'set' : ["Country","size1","size2","size12","size14","size15","Country","size3","size4","size9","size13","size25","size27"],
)
For each row (group X set combination) of df2, I want to apply a function to calculate (sum of "val"/sum of "par").
I tried to use something with apply function but I could not really figure out since I am pretty new in python.
Could anyone please help regarding a solution?
below is the expected outcome:

As image upload keeps failing, I am also sharing below the code to get the outcome in the ugliest and most inefficient hardcoding way:
a1=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["val"]
a2=df1[(df1["group"]==df2.iloc[0,0])&(df1["set_0"]==df2.iloc[0,1])].sum()["par"]
b1=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["val"]
b2=df1[(df1["group"]==df2.iloc[1,0])&(df1["set_1"]==df2.iloc[1,1])].sum()["par"]
c1=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["val"]
c2=df1[(df1["group"]==df2.iloc[2,0])&(df1["set_1"]==df2.iloc[2,1])].sum()["par"]
d1=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["val"]
d2=df1[(df1["group"]==df2.iloc[3,0])&(df1["set_2"]==df2.iloc[3,1])].sum()["par"]
e1=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["val"]
e2=df1[(df1["group"]==df2.iloc[4,0])&(df1["set_3"]==df2.iloc[4,1])].sum()["par"]
f1=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["val"]
f2=df1[(df1["group"]==df2.iloc[5,0])&(df1["set_3"]==df2.iloc[5,1])].sum()["par"]
g1=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["val"]
g2=df1[(df1["group"]==df2.iloc[6,0])&(df1["set_0"]==df2.iloc[6,1])].sum()["par"]
h1=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["val"]
h2=df1[(df1["group"]==df2.iloc[7,0])&(df1["set_1"]==df2.iloc[7,1])].sum()["par"]
j1=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["val"]
j2=df1[(df1["group"]==df2.iloc[8,0])&(df1["set_1"]==df2.iloc[8,1])].sum()["par"]
k1=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["val"]
k2=df1[(df1["group"]==df2.iloc[9,0])&(df1["set_2"]==df2.iloc[9,1])].sum()["par"]
l1=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["val"]
l2=df1[(df1["group"]==df2.iloc[10,0])&(df1["set_2"]==df2.iloc[10,1])].sum()["par"]
m1=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["val"]
m2=df1[(df1["group"]==df2.iloc[11,0])&(df1["set_4"]==df2.iloc[11,1])].sum()["par"]
n1=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["val"]
n2=df1[(df1["group"]==df2.iloc[12,0])&(df1["set_4"]==df2.iloc[12,1])].sum()["par"]
Up to this part, I had to manually create "val" and "par" pairs for each element.
Then,
a=a1/a2
b=b1/b2
c=c1/c2
d=d1/d2
e=e1/e2
f=f1/f2
g=g1/g2
h=h1/h2
j=j1/j2
k=k1/k2
l=l1/l2
m=m1/m2
n=n1/n2
Finally, the result is:
df2["desired_calculation"]=[a,b,c,d,e,f,g,h,j,k,l,m,n]
python-3.x function apply
python-3.x function apply
edited Nov 14 '18 at 10:31
nkltkf
asked Nov 13 '18 at 11:48
nkltkfnkltkf
113
113
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58
add a comment |
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58
add a comment |
0
active
oldest
votes
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%2f53280408%2fapplying-row-wise-function-in-a-data-frame-with-values-of-another-data-frame%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f53280408%2fapplying-row-wise-function-in-a-data-frame-with-values-of-another-data-frame%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
Can you show us your desired output?
– jpp
Nov 13 '18 at 14:23
@jpp, not sure if the pasted output is gonna look readable, sharing it with an edit.
– nkltkf
Nov 13 '18 at 19:58