Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2882 Prikazi

Hello,


I have the following data structure in a csv file in the data folder.

id limit fix percent
1 0 0 0.05
2 5000 300 0.10
3 10000 1000 0.20
4 25000 4000 0.30


I want to get in separate variables the values of columns 2, 3 and 4 depending on main_variable

So for example

if main_variable is 2500, then var2 = 0, var3 = 0 and var4 = 0.05

if main_variable is 7000, then var2 = 5000, var3 = 300 and var4 = 0.10
if main_variable is 15000, then var2 = 10000, var3 = 1000 and var4 = 0.20

Any suggestions?

Regards,


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
3
mar. 15
10292
1
mar. 15
8907
1
apr. 24
2224
1
jun. 23
1986
2
maj 23
2634