Python Leer 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)
Random boi
# 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)
import pandas as pd
df = pd.read_csv (r'Path where the CSV file is stored\File name.csv')
print (df)
import csv
with open('eggs.csv', newline='') as csvfile:
spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
for row in spamreader:
print(', '.join(row))
# Output:
# Spam, Spam, Spam, Spam, Spam, Baked Beans
# Spam, Lovely Spam, Wonderful Spam