Click here to Skip to main content
15,895,423 members

Comments by Member 14991075 (Top 11 by date)

Member 14991075 3-Mar-23 2:19am View    
Deleted
ok thank you, but there is a problem. I would like to set a for column 1 and b for column 2 with the use of pandas library.
Which command should I use? I tried


import pandas as pd

filename = 'input_text.txt'
df = pd.read_csv(filename, sep='\t',usecols=[0,1])
print(df)
a = df.column[1]


but no use...
Member 14991075 2-Mar-23 12:38pm View    
ok how to set a for column 1, and b for column 2?
Member 14991075 4-Jan-22 8:58am View    
I use command
open(7,file='testdata.txt',status='old')

It is no use?
testdata.txt is my input file
Member 14991075 4-Jan-22 8:49am View    
I would like to check if the commands of my code read my data of my input file. But this code show one 1x1 column with zeros (0) and do not show the data of the first column of my input file
Member 14991075 4-Jan-22 8:09am View    
The problem is that I have a file with 14 columns and 644 lines. I use these commands but my .exe file does not showing what I would like


I give you my code:
parameter (len=644) ! lines
dimension A(len,14) !rows
C real IMM, lat, lon
character header*110,Var1(len)*4,Var2(len)*8,Var3(len)*8
+ ,Var4(len)*8,Var5(len)*8,Var6(len)*8,Var7(len)*8,Var8(len)*8,Var9(len)*8,
+ ,Var10(len)*8, Var11(len)*8,Var12(len)*8,Var13(len)*8,Var14(len)*8,header_append*97
open(7,file='testdata.txt',status='old')
open(8,file='EX-1.out',status='unknown')

do i=1,len
write(*,5) A(i,1)
end do


5 format(2x,f3.1)

do i=1,ip
write(*,5) A(i,1)
end do

stop
end

Could you please help me?