Reading a CSV file into Python Pandas
Before beginning let me remind you that this tutorial is not for beginners. If you are beginner you can start with reading python overview post.
Python Pandas library plays important role in Data science and Data Analytics.
First let me introduce our readers to Pandas and then we can start with technical things and see some codes.
Pandas is a software library written in python programming language for data manipulation and analysis.
I would like to list out few library features before we begin with actual tutorial “Reading a CSV file into Python Pandas”
Pandas Library features
- Pandas creates DataFrame objects for data manipulation with integrated indexing
- It lets you handle missing data
- Pandas lets you reshape and pivot data
- Column and rows insertion and deletion
- DataFrame merging, joining, appending etc
- Split apply combine operations on DataFrame
- and lot more …………………
Thats it for pandas overview for now as we will have many posts explaining various things about it.
Though we can create DataFrame out of various file types such as CSV, excel, html, sql, hdf etc we will concentrate mainly on reading CSV file for now. But of course you can use below codes to read other files with slight modification which i will mention at the end of the post.
Pandas can read many file formats and data types other than CSV.
First let me list down all the supported file formats and data types
Pandas supported formats and data types
To read above files just use following commands
Note : This is first draft of the post I will keep adding more useful stuff to this post. Soon i will add examples for each of the above mentioned command.