Answers for "read a csv"

18

python read csv

# pip install pandas 
import pandas as pd

# Read the csv file
data = pd.read_csv('data.csv')

# Print it out if you want
print(data)
Posted by: Guest on October-03-2020
-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