str is not callable python

I was working with a CSV file on a project and after reading the CSV into the Program with the pandas.read_csv function the returned data type seemed not be a Dataframe for some reason

code was as follows:

sample = pd.read_csv(‘sample.csv’)

When i tried to run some functions on the supposed ‘returned dataframe object -sample’ I get an error which states- TypeError: ‘str’ object is not callable

Fix: It appeared to be an update issue so , I ran an update on my Anaconda package using conda update anaconda  and that fixed the issue.

 

Hope it helps someone!

Similar Posts

One Comment

Leave a Reply

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