Answers for "reading files with csv"

0

how to read a csv file in python

import csv
with open('some.csv', newline='') as f:
    reader = csv.reader(f)
    for row in reader:
        print(row)
Posted by: Guest on May-14-2021
0

reading csv data

int main() {
    string line;
    vector<string> rawdata;
    ifstream file ( "/Users/mewtwo/Desktop/Programs/seals.csv" );
    while(getline(file, line)) {
        stringstream ss(line);
        while (getline(ss, line, ',')) {
            rawdata.push_back(line);
        }

    }
    cout << rawdata[55] << endl;
    
    
    return 0;
}
Posted by: Guest on August-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language