Answers for "how to read the data from csv file in 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
8

how to open csv file in python

import pandas as pd # pip install pandas

#read the CSV file
data_file = =pd.read_csv('some_file.csv')
print(data_file)
Posted by: Guest on March-01-2021

Code answers related to "how to read the data from csv file in python"

Python Answers by Framework

Browse Popular Code Answers by Language