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
2,936 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

0 votes
1 answer

Error:UnicodeDecodeError when reading CSV file in Pandas with Python

Hello @kartik, Try this: import pandas as pd df = ...READ MORE

answered Jun 15, 2020 in Python by Niroj
• 82,840 points
7,814 views
+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
• 58,020 points
1,014 views
0 votes
0 answers

cannot read a csv file in python

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

Mar 6, 2019 in Python by Mohammad
• 3,230 points
744 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,300 points
1,967 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

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

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,042 views
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
19,208 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP