Home > Notes > Python Pandas

pandas Read csv and Excel File

pandas Read csv and Excel File

Read CSV Files

A simple way to store big data sets is to use CSV files (comma separated files). CSV files contains plain text and is a well know format that can be read by everyone including Pandas. In our examples we will be using a CSV file called ‘data.csv’.

 import pandas as pd
 df = pd.read_csv('data.csv')

Read Excel Files

A simple way to store big data sets is to use Excel files. Excel files contains row and column Data. In our examples we will be using a CSV file called ‘data.xlsx’.

newData = pds.read_excel(file)
 print(newData)