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

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,820 points
+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,140 points
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
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
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 2,424 views
0 votes
0 answers
+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,810 points
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