Click here to Skip to main content
15,881,625 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am doing sample based on the numbers extracted after the filteration operation.Below is the count i am getting:-

df_ID[['Bucket','Service']].value_counts()

Output:-
Eg. Bucket            Service
Tier 2                das                         7
                      cure                        5
                      red                         5
Tier 1                das                         4
Potential             cure                        3
Tier 1                red                         2
Potential             red                         1
Tier 1                cure                        1


The above numbers might change i.e. its dynamic as the above numbers i am getting is after some pre-filteration methods.

I need to select the above count based on the sampling method using python.

Help needed to formulate the above problem in python/

What I have tried:

Random sampling using python but not getting the right logic
Posted
Updated 2-Dec-22 2:43am
v3
Comments
Richard MacCutchan 2-Dec-22 7:36am    
You have not explained what help you need.
Rishi 2022 2-Dec-22 8:12am    
Updated my question..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900