跳至内容
菜单
此问题已终结
2766 查看

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,


形象
丢弃
相关帖文 回复 查看 活动
3
3月 15
10156
1
3月 15
8707
1
4月 24
2061
1
6月 23
1812
2
5月 23
2472