Group counter for ranges of valuesParsing Wikipedia data in PythonPi-calculating programTriangle...

How can I fix this gap between bookcases I made?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Why do UK politicians seemingly ignore opinion polls on Brexit?

Ideas for 3rd eye abilities

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Is every set a filtered colimit of finite sets?

Is ipsum/ipsa/ipse a third person pronoun, or can it serve other functions?

How to deal with fear of taking dependencies

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

Email Account under attack (really) - anything I can do?

Was there ever an axiom rendered a theorem?

Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore

Patience, young "Padovan"

Why airport relocation isn't done gradually?

Pristine Bit Checking

What are the advantages and disadvantages of running one shots compared to campaigns?

How to manage monthly salary

Re-submission of rejected manuscript without informing co-authors

How to make payment on the internet without leaving a money trail?

Are cabin dividers used to "hide" the flex of the airplane?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Typesetting a double Over Dot on top of a symbol

Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?

What does "enim et" mean?



Group counter for ranges of values


Parsing Wikipedia data in PythonPi-calculating programTriangle rasterization using a scanline algorithm for numpy array indexingCompute the box covering on a graph using CPythonRetrive data for Table from m2m through field is slowSplit list of integers at certain value efficientlyPerformance of stable marriage solution in Python 3Rearrange page numbers for printing a bookCountdown numbers game (Solution generator)Python script for monitoring systemd services (cpu/memory usage)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3












$begingroup$


I have this grouping thing, which is would be a switch case if it weren't for the ranges or a Counter of some sorts, but as there are those ranges I don't know how to implement this any more efficiently.



def getGroups(user_array):
# group1 is group 1-10 x
group1 = 0
# group2 is group 10-50 x
group2 = 0
# group3 is group 50-100 x
group3 = 0
# group4 is group 100-200 x
group4 = 0
# group5 is group 200-500 x
group5 = 0
# group6 is group 500 - 1000 x
group6 = 0
# group7 is group 1000+ x
group7 = 0

for user in user_array:
if user.x_count == 0:
pass
elif user.x_count <= 10:
group1 += 1
elif user.x_count <= 50:
group2 += 1
elif user.x_count <= 100:
group3 += 1
elif user.x_count <= 200:
group4 += 1
elif user.x_count <= 500:
group5 += 1
elif user.x_count <= 1000:
group6 += 1
else:
group7 += 1
return [group1, group2, group3, group4, group5, group6, group7]









share|improve this question









New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    For what type of application are you using/planning to use this?
    $endgroup$
    – Alex
    yesterday










  • $begingroup$
    @Alex Does it matter? I'm trying to group some users for a small project for visualisation.
    $endgroup$
    – creyD
    yesterday












  • $begingroup$
    Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
    $endgroup$
    – Alex
    yesterday












  • $begingroup$
    Also, does user_array only contain int values, or can it contain floating point numbers?
    $endgroup$
    – AJNeufeld
    yesterday










  • $begingroup$
    @Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
    $endgroup$
    – creyD
    18 hours ago




















3












$begingroup$


I have this grouping thing, which is would be a switch case if it weren't for the ranges or a Counter of some sorts, but as there are those ranges I don't know how to implement this any more efficiently.



def getGroups(user_array):
# group1 is group 1-10 x
group1 = 0
# group2 is group 10-50 x
group2 = 0
# group3 is group 50-100 x
group3 = 0
# group4 is group 100-200 x
group4 = 0
# group5 is group 200-500 x
group5 = 0
# group6 is group 500 - 1000 x
group6 = 0
# group7 is group 1000+ x
group7 = 0

for user in user_array:
if user.x_count == 0:
pass
elif user.x_count <= 10:
group1 += 1
elif user.x_count <= 50:
group2 += 1
elif user.x_count <= 100:
group3 += 1
elif user.x_count <= 200:
group4 += 1
elif user.x_count <= 500:
group5 += 1
elif user.x_count <= 1000:
group6 += 1
else:
group7 += 1
return [group1, group2, group3, group4, group5, group6, group7]









share|improve this question









New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    For what type of application are you using/planning to use this?
    $endgroup$
    – Alex
    yesterday










  • $begingroup$
    @Alex Does it matter? I'm trying to group some users for a small project for visualisation.
    $endgroup$
    – creyD
    yesterday












  • $begingroup$
    Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
    $endgroup$
    – Alex
    yesterday












  • $begingroup$
    Also, does user_array only contain int values, or can it contain floating point numbers?
    $endgroup$
    – AJNeufeld
    yesterday










  • $begingroup$
    @Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
    $endgroup$
    – creyD
    18 hours ago
















3












3








3





$begingroup$


I have this grouping thing, which is would be a switch case if it weren't for the ranges or a Counter of some sorts, but as there are those ranges I don't know how to implement this any more efficiently.



def getGroups(user_array):
# group1 is group 1-10 x
group1 = 0
# group2 is group 10-50 x
group2 = 0
# group3 is group 50-100 x
group3 = 0
# group4 is group 100-200 x
group4 = 0
# group5 is group 200-500 x
group5 = 0
# group6 is group 500 - 1000 x
group6 = 0
# group7 is group 1000+ x
group7 = 0

for user in user_array:
if user.x_count == 0:
pass
elif user.x_count <= 10:
group1 += 1
elif user.x_count <= 50:
group2 += 1
elif user.x_count <= 100:
group3 += 1
elif user.x_count <= 200:
group4 += 1
elif user.x_count <= 500:
group5 += 1
elif user.x_count <= 1000:
group6 += 1
else:
group7 += 1
return [group1, group2, group3, group4, group5, group6, group7]









share|improve this question









New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I have this grouping thing, which is would be a switch case if it weren't for the ranges or a Counter of some sorts, but as there are those ranges I don't know how to implement this any more efficiently.



def getGroups(user_array):
# group1 is group 1-10 x
group1 = 0
# group2 is group 10-50 x
group2 = 0
# group3 is group 50-100 x
group3 = 0
# group4 is group 100-200 x
group4 = 0
# group5 is group 200-500 x
group5 = 0
# group6 is group 500 - 1000 x
group6 = 0
# group7 is group 1000+ x
group7 = 0

for user in user_array:
if user.x_count == 0:
pass
elif user.x_count <= 10:
group1 += 1
elif user.x_count <= 50:
group2 += 1
elif user.x_count <= 100:
group3 += 1
elif user.x_count <= 200:
group4 += 1
elif user.x_count <= 500:
group5 += 1
elif user.x_count <= 1000:
group6 += 1
else:
group7 += 1
return [group1, group2, group3, group4, group5, group6, group7]






python






share|improve this question









New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









200_success

131k17157422




131k17157422






New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









creyDcreyD

1185




1185




New contributor




creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






creyD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    For what type of application are you using/planning to use this?
    $endgroup$
    – Alex
    yesterday










  • $begingroup$
    @Alex Does it matter? I'm trying to group some users for a small project for visualisation.
    $endgroup$
    – creyD
    yesterday












  • $begingroup$
    Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
    $endgroup$
    – Alex
    yesterday












  • $begingroup$
    Also, does user_array only contain int values, or can it contain floating point numbers?
    $endgroup$
    – AJNeufeld
    yesterday










  • $begingroup$
    @Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
    $endgroup$
    – creyD
    18 hours ago




















  • $begingroup$
    For what type of application are you using/planning to use this?
    $endgroup$
    – Alex
    yesterday










  • $begingroup$
    @Alex Does it matter? I'm trying to group some users for a small project for visualisation.
    $endgroup$
    – creyD
    yesterday












  • $begingroup$
    Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
    $endgroup$
    – Alex
    yesterday












  • $begingroup$
    Also, does user_array only contain int values, or can it contain floating point numbers?
    $endgroup$
    – AJNeufeld
    yesterday










  • $begingroup$
    @Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
    $endgroup$
    – creyD
    18 hours ago


















$begingroup$
For what type of application are you using/planning to use this?
$endgroup$
– Alex
yesterday




$begingroup$
For what type of application are you using/planning to use this?
$endgroup$
– Alex
yesterday












$begingroup$
@Alex Does it matter? I'm trying to group some users for a small project for visualisation.
$endgroup$
– creyD
yesterday






$begingroup$
@Alex Does it matter? I'm trying to group some users for a small project for visualisation.
$endgroup$
– creyD
yesterday














$begingroup$
Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
$endgroup$
– Alex
yesterday






$begingroup$
Indeed, it does. Your application can greatly influence what aspects matter most about your code. Random examples: hyper-critical, real-time, background application, code it and never touch again? Aim for fast execution. You/others should be able to "play" with it? Ease of use and clarity are prime considerations here.
$endgroup$
– Alex
yesterday














$begingroup$
Also, does user_array only contain int values, or can it contain floating point numbers?
$endgroup$
– AJNeufeld
yesterday




$begingroup$
Also, does user_array only contain int values, or can it contain floating point numbers?
$endgroup$
– AJNeufeld
yesterday












$begingroup$
@Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
$endgroup$
– creyD
18 hours ago






$begingroup$
@Alex Ah ok, the focus is mainly performance as we use it to group the results of some mined data... And yes it only contains int values.
$endgroup$
– creyD
18 hours ago












1 Answer
1






active

oldest

votes


















3












$begingroup$

If your data is strictly integer values, you can use user.x_count in range(...) to test whether or not the user.x_count value is a member of the range(...) set. Ie)



def getUsers(user_array):
group1 = sum(1 for user in user_array if user.x_count in range(1, 11))
group2 = sum(1 for user in user_array if user.x_count in range(11, 51))
# ... etc ...


This unfortunately will require several passes through your user_array data, so will not work if that data is ephemeral, such as iterator or generator based.



A more complex method will categorize the user.x_count value into a group value, and then increment the appropriate group counter. bisect will find an insertion index in a sorted array, so we can leverage this to turn a user.x_count into a group based on its corresponding insertion index. This will function properly if floating point values are encountered.



import bisect

def getUsers(user_array):
thresholds = (0, 10, 50, 100, 200, 500, 1000)
groups = [0] * (len(thresholds) + 1)

for user in user_array:
groups[bisect.bisect_left(thresholds, user.x_count)] += 1

return groups[1:]


Notice there are no more group-specific variables, like group1. Instead, all counters are created based on data, allowing you to add additional groups without modifying lines of code; you just modify data.






share|improve this answer











$endgroup$













  • $begingroup$
    That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
    $endgroup$
    – creyD
    18 hours ago






  • 1




    $begingroup$
    I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
    $endgroup$
    – Alex
    15 hours ago










  • $begingroup$
    @Alex Thank you :)
    $endgroup$
    – creyD
    11 hours ago












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");

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: "196"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});


}
});






creyD is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217021%2fgroup-counter-for-ranges-of-values%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3












$begingroup$

If your data is strictly integer values, you can use user.x_count in range(...) to test whether or not the user.x_count value is a member of the range(...) set. Ie)



def getUsers(user_array):
group1 = sum(1 for user in user_array if user.x_count in range(1, 11))
group2 = sum(1 for user in user_array if user.x_count in range(11, 51))
# ... etc ...


This unfortunately will require several passes through your user_array data, so will not work if that data is ephemeral, such as iterator or generator based.



A more complex method will categorize the user.x_count value into a group value, and then increment the appropriate group counter. bisect will find an insertion index in a sorted array, so we can leverage this to turn a user.x_count into a group based on its corresponding insertion index. This will function properly if floating point values are encountered.



import bisect

def getUsers(user_array):
thresholds = (0, 10, 50, 100, 200, 500, 1000)
groups = [0] * (len(thresholds) + 1)

for user in user_array:
groups[bisect.bisect_left(thresholds, user.x_count)] += 1

return groups[1:]


Notice there are no more group-specific variables, like group1. Instead, all counters are created based on data, allowing you to add additional groups without modifying lines of code; you just modify data.






share|improve this answer











$endgroup$













  • $begingroup$
    That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
    $endgroup$
    – creyD
    18 hours ago






  • 1




    $begingroup$
    I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
    $endgroup$
    – Alex
    15 hours ago










  • $begingroup$
    @Alex Thank you :)
    $endgroup$
    – creyD
    11 hours ago
















3












$begingroup$

If your data is strictly integer values, you can use user.x_count in range(...) to test whether or not the user.x_count value is a member of the range(...) set. Ie)



def getUsers(user_array):
group1 = sum(1 for user in user_array if user.x_count in range(1, 11))
group2 = sum(1 for user in user_array if user.x_count in range(11, 51))
# ... etc ...


This unfortunately will require several passes through your user_array data, so will not work if that data is ephemeral, such as iterator or generator based.



A more complex method will categorize the user.x_count value into a group value, and then increment the appropriate group counter. bisect will find an insertion index in a sorted array, so we can leverage this to turn a user.x_count into a group based on its corresponding insertion index. This will function properly if floating point values are encountered.



import bisect

def getUsers(user_array):
thresholds = (0, 10, 50, 100, 200, 500, 1000)
groups = [0] * (len(thresholds) + 1)

for user in user_array:
groups[bisect.bisect_left(thresholds, user.x_count)] += 1

return groups[1:]


Notice there are no more group-specific variables, like group1. Instead, all counters are created based on data, allowing you to add additional groups without modifying lines of code; you just modify data.






share|improve this answer











$endgroup$













  • $begingroup$
    That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
    $endgroup$
    – creyD
    18 hours ago






  • 1




    $begingroup$
    I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
    $endgroup$
    – Alex
    15 hours ago










  • $begingroup$
    @Alex Thank you :)
    $endgroup$
    – creyD
    11 hours ago














3












3








3





$begingroup$

If your data is strictly integer values, you can use user.x_count in range(...) to test whether or not the user.x_count value is a member of the range(...) set. Ie)



def getUsers(user_array):
group1 = sum(1 for user in user_array if user.x_count in range(1, 11))
group2 = sum(1 for user in user_array if user.x_count in range(11, 51))
# ... etc ...


This unfortunately will require several passes through your user_array data, so will not work if that data is ephemeral, such as iterator or generator based.



A more complex method will categorize the user.x_count value into a group value, and then increment the appropriate group counter. bisect will find an insertion index in a sorted array, so we can leverage this to turn a user.x_count into a group based on its corresponding insertion index. This will function properly if floating point values are encountered.



import bisect

def getUsers(user_array):
thresholds = (0, 10, 50, 100, 200, 500, 1000)
groups = [0] * (len(thresholds) + 1)

for user in user_array:
groups[bisect.bisect_left(thresholds, user.x_count)] += 1

return groups[1:]


Notice there are no more group-specific variables, like group1. Instead, all counters are created based on data, allowing you to add additional groups without modifying lines of code; you just modify data.






share|improve this answer











$endgroup$



If your data is strictly integer values, you can use user.x_count in range(...) to test whether or not the user.x_count value is a member of the range(...) set. Ie)



def getUsers(user_array):
group1 = sum(1 for user in user_array if user.x_count in range(1, 11))
group2 = sum(1 for user in user_array if user.x_count in range(11, 51))
# ... etc ...


This unfortunately will require several passes through your user_array data, so will not work if that data is ephemeral, such as iterator or generator based.



A more complex method will categorize the user.x_count value into a group value, and then increment the appropriate group counter. bisect will find an insertion index in a sorted array, so we can leverage this to turn a user.x_count into a group based on its corresponding insertion index. This will function properly if floating point values are encountered.



import bisect

def getUsers(user_array):
thresholds = (0, 10, 50, 100, 200, 500, 1000)
groups = [0] * (len(thresholds) + 1)

for user in user_array:
groups[bisect.bisect_left(thresholds, user.x_count)] += 1

return groups[1:]


Notice there are no more group-specific variables, like group1. Instead, all counters are created based on data, allowing you to add additional groups without modifying lines of code; you just modify data.







share|improve this answer














share|improve this answer



share|improve this answer








edited 23 hours ago

























answered yesterday









AJNeufeldAJNeufeld

6,6791722




6,6791722












  • $begingroup$
    That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
    $endgroup$
    – creyD
    18 hours ago






  • 1




    $begingroup$
    I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
    $endgroup$
    – Alex
    15 hours ago










  • $begingroup$
    @Alex Thank you :)
    $endgroup$
    – creyD
    11 hours ago


















  • $begingroup$
    That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
    $endgroup$
    – creyD
    18 hours ago






  • 1




    $begingroup$
    I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
    $endgroup$
    – Alex
    15 hours ago










  • $begingroup$
    @Alex Thank you :)
    $endgroup$
    – creyD
    11 hours ago
















$begingroup$
That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
$endgroup$
– creyD
18 hours ago




$begingroup$
That second solution looks really good. We don't need the temporary variables anyways and as the result is the same array, that is very good. The first option however is probably to slow, as it is a very large array. Even tho the code would be more readable. Thank you for your answer!
$endgroup$
– creyD
18 hours ago




1




1




$begingroup$
I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
$endgroup$
– Alex
15 hours ago




$begingroup$
I also like the second solution. If you're not bound to the standard library, maybe also have a look at Python packages like pandas which are widely used in data analytics.
$endgroup$
– Alex
15 hours ago












$begingroup$
@Alex Thank you :)
$endgroup$
– creyD
11 hours ago




$begingroup$
@Alex Thank you :)
$endgroup$
– creyD
11 hours ago










creyD is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















creyD is a new contributor. Be nice, and check out our Code of Conduct.













creyD is a new contributor. Be nice, and check out our Code of Conduct.












creyD is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Code Review Stack Exchange!


  • 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.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217021%2fgroup-counter-for-ranges-of-values%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...