I'm creating a web form that has a drop down with pre-filled values, then a minimum text field and maximum text field.

min_max_input_image

Is it possible to group these together so when i call 'print(requests.form)' from these inputs it would display as :

ImmutableMultiDict([('csrf_token', '...'), ('min1', 'TURNOVER', '0', '5000000')

rather than this output:

ImmutableMultiDict([('csrf_token', '...'), ('min1', 'TURNOVER'), ('min1_val', '0'), ('max1_val', '5000000')])

I'm looking to insert the output of the form into a DataFrame that will display like this:

  Field Min      Max

0 TURNOVER 0 5000000

I've managed to produce this where i have to assign each input value to a variable, but it currently seems like a messy solution. Is there a better way of handling this?

Thanks

0 Answers