jeudi 5 octobre 2017

how to create a list with random round values with a given max value

I want to create a list with a length of 4

I have a df,

        contents    values
    0   A           484
    1   B           429
    2   C           130
    3   D           108
    4   E           77
    5   F           2

I want to define a bin range for these values. I am trying to get a df in what range these values are lying here, I have a max_value of 484.

  my_max=468, it should give round-off values in the list

  my desired output is, output_list=[0,100,300,500]




Aucun commentaire:

Enregistrer un commentaire