Python error "'Series' object is not callable "

0 votes

This line:

df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid'](1))

Gives the following error:

'Series' object is not callable 
Jul 22 in Python by Asish
941 views

1 answer to this question.

0 votes

Try this:

df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid'])

df['Close_mid'](1)) doesn't seem to be doing anything

answered Jul 22 by Greg

Related Questions In Python

0 votes
1 answer

i am normalizing the data set iris in python and get the error ::TypeError: 'numpy.float64' object is not callable

TRY THIS   #Nomalisation for i in names:     print(i)   ...READ MORE

answered Aug 19 in Python by Noel Deepak Palle
618 views
0 votes
2 answers
0 votes
1 answer

print(instance(0).id) TypeError: 'list' object is not callable

Hey @Suraj, For me its working fine. ...READ MORE

answered Jan 18 in Python by Priyaj
• 57,300 points
295 views
0 votes
1 answer

Python error "Python NameError: global name 'Thread' is not defined"

There is a built-in function with the ...READ MORE

answered May 31 in Python by Riya
485 views
+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 409 views
+4 votes
6 answers
0 votes
1 answer

Python TypeError: 'list' object is not callable.

The error says the list is not ...READ MORE

answered Feb 8 in Python by Omkar
• 68,160 points
2,946 views
0 votes
1 answer

Python argparse error "NameError: name 'file' is not defined"

The right datatype for destination in argpasrse module ...READ MORE

answered Nov 28, 2018 in Python by Omkar
• 68,160 points
2,054 views