0

I want to generate all combinations of a list that have the format:

[{"first": a, "second": b, "third": c, "fourth": d}, {"first": e, "second": f, "third": g, "fourth": h}, {"first": i, "second": j, "third": k, "fourth": l}]

where a, b, c, e, f, g, h, i, j are float between 0.1 and 0.9 and d, h, l are integers between -20 and 20.

I am using for loops with range() but it takes too much time or cpu.

Antoine
  • 130
  • 2
  • 12

1 Answers1

-1

You could do it through pandas, where each of your keys is a column in the dataframe and you then get the list of dictionaries out of it (see here)

DDD1
  • 361
  • 1
  • 11