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, 2019 in Python by Preeti
132 views

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, 2019 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
• 57,510 points
73 views
0 votes
0 answers

cannot read a csv file in python

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

Mar 5, 2019 in Python by Mohammad
• 3,210 points
29 views
0 votes
1 answer

Reading a CSV file using Python 3

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

answered Mar 26, 2019 in Python by SDeb
• 13,230 points
539 views
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, 2019 in Python by Karan
369 views
0 votes
1 answer
+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, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 543 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer

How to find the value of a row in a csv file in python?

If you want to find the value ...READ MORE

answered May 20, 2019 in Python by Sanam
76 views