aggregate Questions

3

Solved

Lets say I have the following list in python. It is ordered first by Equip, then by Date: my_list = [ {'Equip': 'A-1', 'Job': 'Job 1', 'Date': '2018-01-01'}, {'Equip': 'A-1', 'Job': 'Job 1', 'Da...
Kennedy asked 4/11, 2018 at 19:56

5

I have seen an example of AggregateException on the web and I'm trying to figure out how it works. I have written a simple example, but my code for some reason doesn't work. Could someone explain ...
Tindle asked 19/7, 2011 at 23:56

4

Solved

I have the following data frame "DF" which is part of a much larger one: X1 X2 X3 X4 X5 4468 2010-03-24 3 1.000000e+00 1 2 7662 2010-03-24 9 3.000000e+00 2 1 1272 2010-03-25 8 2.000000e+00 1 1 12...
Arbil asked 13/5, 2013 at 16:54

1

I have Following Project Collection Project Collection : [ { Id : 1, name : p1, tasks : [{ taskId : t1, startDate : ISODate("2018-09-24T10:02:49.403Z"), endDate : ISODate("2018-09-26T10:02:...

2

Solved

Given the following list: var data = new[] { new {category = "Product", text = "aaaa"}, new {category = "Product", text = "bbbb"}, new {category = "Product", text = "bbbb"}, }; how do I gro...
Vins asked 3/4, 2013 at 10:17

4

Solved

I would like to aggregate a data frame by time interval, applying a different function to each column. I think I almost have aggregate down, and have divided my data into intervals with the chron p...
Relieve asked 22/7, 2012 at 16:49

3

Solved

I have a table named 'Attendance' which is used to record student attendance time in courses. This table has 4 columns, say 'id', 'course_id', 'attendance_time', and 'student_name'. An example of f...
Moye asked 26/7, 2010 at 7:19

3

Solved

I have an URL pointing to content and I need to get the highest value contained in one of the columns. Is there any aggregate function that will accomplish that or do I have to do this manually?
Mayonnaise asked 25/5, 2009 at 13:7

3

Solved

I have a pandas dataframe that looks as follows: X Y 71455 [334.0, 319.0, 298.0, 323.0] 71455 [3.0, 8.0, 13.0, 10.0] 57674 [54.0, 114.0, 124.0, 103.0] I want to perform an aggregate groupby that...
Tildy asked 20/8, 2018 at 8:20

1

Solved

I want to use aggregate with this custom function: #linear regression f-n CalculateLinRegrDiff = function (sample){ fit <- lm(value~ date, data = sample) diff(range(fit$fitted)) } dataset2 =...
Pinkerton asked 15/8, 2018 at 10:38

5

Solved

Is there a way to do this with linq without enumerating the fooCollection twice? var fooCollection = // get foo var selectedIds = new List<int>(); var aggregateContent = String.Empty; forea...
Alluvium asked 17/10, 2012 at 14:22

1

I have an array P = [1, 5, 3, 6, 4, ...] of size N and average A. I want to find the most efficient way to maximize the following 3D function: f(x, y) = 1 / ( (1+e^(-6(x-2))) * (1+e^(-6(y-2))) * ...
Lewin asked 14/7, 2018 at 0:49

3

Solved

In C++14 (gcc 6.3) I have the following code: #include <memory> #include <vector> #include <stdexcept> struct A { int a1; int a2; }; struct B { int b1; std::shared_ptr< ...
Antifederalist asked 10/7, 2018 at 7:53

5

I've inherited the following DB design. Tables are: customers --------- customerid customernumber invoices -------- invoiceid amount invoicepayments --------------- invoicepaymentid invoiceid...
Derwent asked 6/8, 2009 at 23:41

2

Solved

I want to get count of a set based on different condition: var invoices = new AccountingEntities().Transactions var c1 = invoices.Count(i=>i.Type = 0); var c2 = invoices.Count(i=>i.Type =...
Immuno asked 11/11, 2010 at 5:22

6

Solved

You cannot (should not) put non-aggregates in the SELECT line of a GROUP BY query. I would however like access the one of the non-aggregates associated with the max. In plain english, I want a tab...
Cacus asked 2/7, 2010 at 17:59

1

Solved

I have two collections A with schema { a : Array, b : ObjectID } and B with the following schema { x : 'string', y : // some object schema ... b : ObjectID } I want to use mongo aggre...
Buttonball asked 24/6, 2018 at 14:17

4

Solved

I'm having some trouble aggregating a data frame while keeping the groups in their original order (order based on first appearance in data frame). I've managed to get it right, but was hoping there...
Bugs asked 8/8, 2012 at 19:9

1

I have a MongoDB query that groups by 5min windows based on date and returns count (which is the total number of documents in that 5min window using count: { $sum: 1 }). I'd like to have the quer...
Watermelon asked 8/5, 2018 at 22:54

4

Solved

So I have a data frame that has a date column, an hour column and a series of other numerical columns. Each row in the data frame is 1 hour of 1 day for an entire year. The data frame looks like t...
Statistics asked 30/5, 2015 at 9:3

2

Solved

Though I was reading through the NHibernate Cookbook and all available forum-posts up and down, I'm still not able to get this simple query done: I have users with everyone having one account. Eac...
Stupefy asked 16/6, 2011 at 15:38

4

Solved

I have a table with an ID column and another column with a number. One ID can have multiple numbers. For example ID | Number 1 | 25 1 | 26 1 | 30 1 | 24 2 | 4 2 | 8 2 | 5 Now based of thi...
Singlehanded asked 2/1, 2013 at 16:12

1

I've read a lot in the last couple of days, but wasn't able to find a solution which works for me. Also saw some stuff where the string type was using, which is deprecated in the ES version I'm usi...
Dorser asked 8/11, 2017 at 22:20

5

Solved

Does anybody know how to aggregate by NA in R. If you take the example below a <- matrix(1,5,2) a[1:2,2] <- NA a[3:5,2] <- 2 aggregate(a[,1], by=list(a[,2]), sum) The output is: Group...
Reinert asked 25/8, 2015 at 21:10

2

Solved

using a Postgres-Db as source for json-documents, I need to convert two columns from a table to an JSON-object. So I have the columns "color_id", "language" and "name" in a table of colors: col...
Havens asked 7/10, 2016 at 16:49

© 2022 - 2024 — McMap. All rights reserved.