aggregate Questions

2

Solved

I have roughly 7,500 subsidence values. Each subsidence value (V9) corresponds to a station (V2) and a year (V3). I want a line of best fit (V9~V3) for each station. I created a function using lm ...
Aime asked 10/9, 2019 at 14:19

1

Solved

I have a table that contains a field of JSON type, containing arrays of data: Column | Type -------------------+--------- id | integer user_id | uuid changes | jsonb exercise_entry_id | i...
Keyes asked 2/9, 2019 at 13:57

4

Solved

I have a data frame (df) that has about 40 columns, and I want to aggregate using a sum on 4 of the columns. Outside of the 4 I want to sum, each unique value in column 1 corresponds to identical v...
Rhizo asked 5/6, 2015 at 15:2

2

Solved

I have a dataframe which shall be grouped and then on each group several functions shall be applied. Normally, I would do this with groupby().agg() (cf. Apply multiple functions to multiple groupby...
Fivefinger asked 12/8, 2019 at 15:44

9

Solved

I am looking for some better explanation of the aggregate functionality that is available via spark in python. The example I have is as follows (using pyspark from Spark 1.2.0 version) sc.parall...
Returnee asked 30/1, 2015 at 16:49

2

Solved

When I need to apply multiple functions to multiple columns sequentially and aggregate by multiple columns and want the results to be bound into a data frame I usually use aggregate() in the follow...
Rosado asked 29/10, 2014 at 7:12

4

Solved

I have a dataset where each individual (id) has an e_date, and since each individual could have more than one e_date, I'm trying to get the earliest date for each individual. So basically I would l...
Hep asked 11/8, 2016 at 10:24

12

var nums = new[]{ 1, 2, 3, 4, 5, 6, 7}; var pairs = /* some linq magic here*/ ; => pairs = { {1, 2}, {3, 4}, {5, 6}, {7, 0} } The elements of pairs should be either two-element lists, or insta...
Severe asked 16/12, 2010 at 13:45

4

Solved

I know I can *re*name columns after I aggregate the data: blubb <- aggregate(dat$two ~ dat$one, ...) colnames(blubb) <- c("One", "Two") Nothing wrong with that. But is there a way to aggre...
Auspex asked 9/3, 2013 at 9:31

3

Solved

We have ~20M (hotel offers) documents stored in elastic(1.6.2) and the point is to group documents by multiple fields (duration, start_date, adults, kids) and select one cheapest offer out of each ...
Bracelet asked 3/6, 2016 at 12:59

2

I aggregate my Pandas dataframe: data. Specifically, I want to get the average and sum amounts by tuples of [origin and type]. For averaging and summing I tried the numpy functions below: import n...
Heisenberg asked 1/10, 2014 at 16:1

5

Solved

I have the following dataframe (df1): ID someText PSM OtherValues ABC c 2 qwe CCC v 3 wer DDD b 56 ert EEE m 78 yu FFF sw 1 io GGG e 90 gv CCC r 34 scf CCC t 21 fvb KOO y 45 hffd EEE u 2 asd LLL i...
Coacervate asked 27/5, 2013 at 17:30

3

Solved

I have a dataframe which consists of two columns with categorical variables (Better, Similar, Worse). I would like to come up with a table which counts the number of times that these categories app...
Drone asked 2/4, 2019 at 16:26

2

I have got the following pandas DataFrame: time, value 2018-08-02 09:19:37, 2 2018-08-02 09:19:47, 3 2018-08-02 09:19:57, 6 ...... 2018-08-03 04:49:27, 2 2018-08-03 04:49:37, 4 2018-08-03 04:49:4...

5

I would like to use the Enumerable.Aggregate(...) method to concatenate a list of strings separated by a semicolon. Rather easy, isn't it? Considering the following: private const string LISTSEP...
Aphotic asked 15/2, 2013 at 14:43

2

Solved

I have a csv which looks like this: Date,Sentiment 2014-01-03,0.4 2014-01-04,-0.03 2014-01-09,0.0 2014-01-10,0.07 2014-01-12,0.0 2014-02-24,0.0 2014-02-25,0.0 2014-02-25,0.0 2014-02-26,0.0 2014-02...
Stigmatism asked 25/5, 2014 at 20:50

4

Solved

I am trying to obtain counts of each combination of levels of two variables, "week" and "id". I'd like the result to have "id" as rows, and "week" as columns, and the counts as the values. Example...
Selfrespect asked 18/11, 2011 at 17:7

4

Solved

I'm trying to aggregate a 'STRING' field in SQLServer. I would like to find the same function LISTAGG like in Oracle . Do you know how to do the same function or an another method? For Example, ...
Robbert asked 18/3, 2013 at 13:14

5

Solved

I am trying to use a customised function with groupby in pandas. I find that using apply allows me to do that in the following way: (An example which calculates a new mean from two groups) import...
Oleviaolfaction asked 14/1, 2019 at 14:37

2

Solved

I have a dataframe: Type Name Cost A X 545 B Y 789 C Z 477 D X 640 C X 435 B Z 335 A X 850 B Y 152 I have all such combinations in my dataframe with Type ['A','B','C','D'] and Names ['X'...
Holding asked 24/4, 2015 at 11:44

3

Solved

Basically I want is to aggregate some values in a table according to a timespan. What I do is, I take snapshots of a system every 15 minutes and I want to be able to draw some graph over a long pe...
Harrow asked 10/12, 2009 at 2:57

6

This FAQ is about Aggregates and PODs and covers the following material: What are aggregates? What are PODs (Plain Old Data)? More recently, what are trivial or trivially copyable types? How are t...
Luciana asked 14/11, 2010 at 15:35

3

Solved

In R, I am trying to do a very fast rolling mean of a large vector (up to 400k elements) using different window widths, then for each window width summarize the data by the maximum of each year. Th...
Jesus asked 12/8, 2016 at 11:59

2

Solved

I have a data frame in R that generally takes this form: ID Year Amount 3 2000 45 3 2000 55 3 2002 10 3 2002 10 3 2004 30 4 2000 25 4 2002 40 4 2002 15 4 2004 45 4 2004 50 I want...
Chicken asked 19/9, 2018 at 19:50

2

I have a SQL Server table which have records like this ID | Value 1 | 100 2 | 150 3 | 250 4 | 600 5 | 1550 6 | 50 7 | 300 I need to select random records, but the only condition is that the tot...
Foldaway asked 8/11, 2018 at 9:53

© 2022 - 2024 — McMap. All rights reserved.