Fortran Reading a specific column from .csv into fortran

Click For Summary
To read specific columns from a .csv file using Fortran, it's necessary to read all columns first and then select the desired ones. This approach allows for flexibility in handling varying row counts across columns. While one column must be defined as an array to facilitate this process, the key takeaway is that the initial step involves reading the entire dataset before filtering for specific columns. This method ensures accurate data extraction for varying column and row configurations.
rajith
Messages
1
Reaction score
0
Hi, I am using fortran to read specific columns from a .csv file. the rows in each columns are different, so I wish to read columns wise with a do loop. say, I wish to read from A1 to D20 initially(4 columns of 20 rows), then later f1 to h35 (3 columns, 35 rows). how do I read particular columns alone. thanks
 
Technology news on Phys.org
You have to read all columns and pick the one you want.
 
jedishrfu said:
You have to read all columns and pick the one you want.

True, but only one of them has to be an array.
 
  • Like
Likes jedishrfu
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 14 ·
Replies
14
Views
7K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
22K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
2K