Error reading csv file in python

0 votes

Hi. I am new to python and I am trying to read a csv file. I am using pandas library for reading it. This is my code

import pandas as pd
filedata = pd.read_csv(“/home/user/data1”)

But I am getting file not found error

Mar 28 in Python by Preeti

1 answer to this question.

0 votes

You are missing the extension. Try this:

import pandas as pd
filedata = pd.read_csv(“/home/user/data1.csv”)
answered Mar 28 by Shri

Related Questions In Python

+1 vote
1 answer

Reading a large file, line by line in Python

The correct, fully Pythonic way to read ...READ MORE

answered Aug 21, 2018 in Python by Priyaj
• 56,940 points
0 votes
0 answers

cannot read a csv file in python

i am getting an error reading a ...READ MORE

Mar 5 in Python by Mohammad
• 3,060 points
0 votes
1 answer

Reading a CSV file using Python 3

A simple "if" statement should suffice. you ...READ MORE

answered Mar 26 in Python by SDeb
• 13,190 points
0 votes
1 answer

How to create LIST from CSV file in Python?

You can use the pandas library for this which ...READ MORE

answered Jul 15 in Python by Karan
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 346 views
+4 votes
6 answers
0 votes
1 answer