Categories
Python Answers

How to import CSV file as a Python Pandas DataFrame?

Spread the love

To import CSV file as a Python Pandas DataFrame, we can use the read_csv method.

For instance, we write

import pandas as pd
print pd.read_csv('value.txt')

to call read_csv with the csv file path to import the CSV and return a data frame from it.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *