Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
46 views

How to get a object in a list using Min and Max together on two different columns in the same line query C#

I have a list: ID REST AMOUNT A 10 100 B 08 100 C 03 100 D 06 100 E 07 200 F 04 200 G 09 300 H 06 400 I 08 500 I've tried and didn't work: var t = Mylist .GroupBy(f => new { f.ID,f.REST,f....
MFcode's user avatar
  • 21
0 votes
1 answer
104 views

How to slice local minima and maxima in a list till last item, without using numpy

I want to search for local maxima and minima through a series of iterations until the list has only one element remaining. Then that last element is the 'winner'. The list contains pairs of player ...
Albert Lutakome's user avatar
0 votes
1 answer
12 views

How to get all the tuple pairs in a list with the min value among the first element

The output would only be the first instance in the list, whereas I want to have both instances of [(1,'a'),(1,'b')] smallest_teams = [] roster = [(1,'a'),(1,'b'),(3,'c')] smallest_teams = list(min(...
Faren's user avatar
  • 23
-1 votes
2 answers
71 views

Finding minimum value in list of lists of lists of lists in python

I have this huge list of values that looks like this but is much larger: CODE: score= [ [[0, 0, 0, 0], [0, 0], [0.14139999999999997]], [[0, 0, 0, 0], [0, 0], [0.19199999999999973]], [[0, 0,...
Ondřej Chumchal's user avatar
0 votes
1 answer
100 views

Get the minimum of a generic List<T>, T extends Comparable

current.getValues(); returns a List of the generic T List<T> val = current.getValues(); return val.stream().min(????) What do I have to fill in the brackets at return val.stream().min(????)? ...
Relez_ 's user avatar
0 votes
0 answers
110 views

Find first index smaller than list value (Isabelle)

Consider a set, say S = {7,0,4}, then sorted_list_of_set(S) = [0,4,7], call that list L. I want to return the smallest index,j, of L such that j < L!j, call that m. I suspect that requires ...
Squirtle's user avatar
  • 143
0 votes
2 answers
64 views

Merging lists/tuples stored inside a list in python

I have a list of lists each containing tuples with some co-ordinates which sort of look like this: [[(x1, y1), (x2, y2), (x3, y3) ... (xn, yn)], [(x1, y1), (x2, y2), (x3, y3) ... (xn, yn)], [(x1, y1), ...
storm00's user avatar
0 votes
2 answers
41 views

Python: Fetch value from dataframe list with min value from another column list of same dataframe

input dataframe Flow row count Apple [45,46] [2,1] Orange [13,14] [1,5] need to find min value of each list column 'count' and fetch respective row value from row column. ...
user12345's user avatar
  • 509
-1 votes
1 answer
34 views

Generating (subsetting) list of lists given a min and max in python

Say I have list: l = [136.29, 136.67, 136.67, 136.68, 136.38, 136.41, 136.41, 136.43, 136.0, 136.09, 136.1, 136.23, 135.71, 135.9, 135.9, 136.02, 135.73, 135.81, 135.82, 136.19, 135.66, 136.15, 136.16,...
tichy's user avatar
  • 79
0 votes
1 answer
498 views

Getting minimum value by output block

I need to get minimum value in output block using variable type number with list Terraform: variable "ports" { type = list(number) default = [12,16,23] } output "ports_count"...
Luis Henrique's user avatar
1 vote
1 answer
72 views

Get max/min value of batches of rows, where condition exists

I need your help/guidance with this particular problem. I am dealing with a dataframe like this: datetime high low 1 2022-08-26 19:00:00+00:00 NaN 0.99564 6 ...
som3k's user avatar
  • 57
-3 votes
2 answers
79 views

Removing single quotes from the list in python to find the minimum value [duplicate]

I have a list with the following entries. How can I remove the single quotes for each entries in the list? I need to find the minimum value in the list. When I used min function, result is wrong due ...
Ajith MS's user avatar
0 votes
1 answer
310 views

Powershell find the lowest string

I printed all employees name in Powershell but now I need to get the longest name between all employees so which code should I write to get?? I have tried this but its only print for me employees ...
h_akm's user avatar
  • 21
0 votes
2 answers
122 views

Why am I getting ValueError when using min() to find the closest matching RGB value?

My code should take an image determine the number of unique colours match each of those colours to the nearest RGB of a pre-defined list of colours The matching is failing on the 90th (of 113) ...
stuart fish's user avatar
-3 votes
3 answers
620 views

Find first and last value greater than 0 in a list in python

It is a list based on a solar measurement system so in the first hours of the day it will be 0 and in the last hours of the day it will be 0, so I am interested in obtaining the minimum and maximum ...
user avatar

15 30 50 per page
1
2 3 4 5
14