Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2820 Lượt xem

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,


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 3 15
10233
1
thg 3 15
8837
1
thg 4 24
2125
1
thg 6 23
1905
2
thg 5 23
2565