Skip to content

How to read a csv file in Python?

# pip install pandas 
import pandas as pd

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

# Print it out if you want
See also  Python code snippet - How to print list without newline?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.