コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2773 ビュー

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
10167
1
3月 15
8717
1
4月 24
2065
1
6月 23
1819
2
5月 23
2484