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, 2019 in Python by Asish
15,681 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

Hope it helps!!

If you need to know more about Python, It's recommended to join Python course today.

Thanks!

answered Jul 22, 2019 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 20, 2019 in Python by Noel Deepak Palle
4,867 views
0 votes
0 answers

TypeError: 'list' object is not callable in python

I am a beginner in Python, created ...READ MORE

Feb 3 in Python by Nandini
• 5,480 points
36 views
0 votes
0 answers

Error: 'int' object is not subscriptable - Python

I was trying a program in which ...READ MORE

Apr 29 in Python by Kichu
• 17,230 points
107 views
0 votes
3 answers

Python error "NameError: name 'sr' is not defined"

NameError: name 'xx' is not defined Python knows ...READ MORE

answered Mar 19, 2020 in Python by rahul
• 360 points
37,343 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 2,761 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
2,058 views
0 votes
1 answer

Python TypeError: 'list' object is not callable.

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

answered Feb 9, 2019 in Python by Omkar
• 69,190 points
27,563 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
• 69,190 points
10,011 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP