I have a (pandas) dataframe like this
f v1 v2
0 1 2
0 2 4
0 0 4
....
0 5 1
1 2 3
1 3 4
...
1 5 7
Let's say this has 100 elements, and half of them are f=0 and half f=1
My goal is to make another dataframe like this
f temperature
0 hot
0 hot
0 hot
....
0 hot
1 cold
1 cold
...
1 cold
So I am thinking that it should be a case of iterating through the f column?
So my question is:
Can I implement the above goal iterating through the f column? and if so, how can this iteration should be written?