sprmnt21
sprmnt21
thanks for your attention. Another way of looking at it could be the following. Think of the starting table df2 as if it were the result of a groupby and...
Here she is. This solution demonstrates the potential of DataFrames to also deal with situations, for which perhaps it was not specifically designed.
Maybe. But you should help me figure out how to fit it to the case.
this is what I can do ... `transform(df2, :sdf =>Tables.dictrowtable(c->mapreduce(x->copy.(eachrow(x)), vcat, c)) => AsTable) ` but i get LoadError: ArgumentError: no default `Tables.rows` implementation for type: var"#83#85"
another way to get the result using only "table functions" this way flatten is used before dictrowtables and flatten doesn't have to handle missing. Perhaps :-) `transform(flatten(transform(df2,:sdf=>ByRow(Tables.rowtable), renamecols=false),:sdf), :sdf=>Tables.dictrowtable=>AsTable) `
the fastest form I have found, at least for the example with a few lines, is the following (although less elegant). `vcat([[repeat(df2[r:r,Not(:sdf)],nrow(df2.sdf[r])) df2[r,:sdf]] for r in 1:nrow(df2)]..., cols=:union)`
an example of origin, I don't know how "natural", of this situation is the dataframe originating from the following expressions using DataFrames list1 = DataFrame(ID=["0001P:ABCD","0001R:ABCD","2324P:CDCL","5666TB:GHLA","789789TSB:ASLT","2324R:CDCL","79067P:OPRA","79067R:OPRA"]) list2 = DataFrame(ID =["0001P:ABCD","0001R:ABCD","2324R:CDCL","5666TB:GHLA"], Pair...
I have no particular contributions to offer, but I am interested in learning something about the subject and I would like to ask a few questions. I would like, for...
after simple algebra you can have that integrand is equal to 1/x +(x + 1)/(x*(x + log(x))**(3/2)) and using for the second part the rtasformation (x+log(x))=t we have an easy...
Thanks. Here [https://docs.juliahub.com/InMemoryDatasets/cS87e/0.6.10/man/byrow/#User-defined-operations](url) here I read that > For user defined functions which return a single value, byrow treats each row as a vector of values, thus the user defined...