I am new in Python and I would like to ask something.
My code reads a csv file. I want to use one column. I want to use an equation which calculates, depending on the value of the column I want to use, several values. I am using commands for and if.
but command window shbows me the error:
TypeError: 'Series' object is not callable
Could you help me?
What I have tried:
my code:
import math
import pandas as pd
import matplotlib as mpl
import numpy as np
dfArxika = pd.read_csv('AIALL.csv', usecols=[0,1,2,3,4,5,6,7,8,9,10], header=None, index_col=False)
print(dfArxika.columns)
A=dfArxika[9]
for i in range(len(A)):
if (A[i] >= 4.8 and A[i] < 66):
IA[i]= (2.2*(math.log10(A[i]/66))+5.5)
elif (A[i] >= 66):
IA[i]= 3.66*(math.log10(A[i]/66)+5.5)
else:
IA[i]=(2.2*(math.log10(A[i]/66))+5.5)