Answers for "read string from csv file python"

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
-1

read entire csv file python

import csv

f = open("fileName.csv") 	#  encoding="utf8"
reader = csv.DictReader(f)  #  delimiter=";", quotechar='"'
data = [row for row in reader]
Posted by: Guest on February-16-2021
-1

read file csv in python

import pandas as pd
import numpy as np
datas = pd.read_csv('data.csv')
a = datas.to_numpy()
print(a[0])
Posted by: Guest on July-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language