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

0 votes
for i in cnames:
    print(i)
    df_csv[i] = (df_csv[i] - min(df_csv[i]))/(max(df_csv[i]) - min(df_csv[i]))

#here df_csv is my dataset name
Jul 14 in Python by anonymous
119 views
Have you used "min" or "max" as a variable in your code?

1 answer to this question.

0 votes

TRY THIS

 

#Nomalisation
for i in names:
    print(i)
    c[i] = (c[i] - c[i].min())/(c[i].max() - c[i].min())

answered Aug 19 by Noel Deepak Palle

Related Questions In Python

0 votes
1 answer

In NumPy how do I get the maximum of subsets? Python

You can use np.maximum.reduceat: >>> _, idx = np.unique(g, ...READ MORE

answered Nov 9, 2018 in Python by Nymeria
• 3,520 points
64 views
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
• 67,380 points
1,457 views
0 votes
1 answer

Why am I getting a error when I am printing two different data types in python?

different data type is being used. that ...READ MORE

answered Mar 6 in Python by Mohammad
• 3,060 points
38 views
0 votes
1 answer

What to do when I get and error saying python not recognized as internal or external command?

You need to set up the path ...READ MORE

answered May 28 in Python by Fata
• 1,040 points
28 views
0 votes
1 answer

Python error "'Series' object is not callable "

Try this: df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid']) df['Close_mid'](1)) doesn't seem to ...READ MORE

answered Jul 22 in Python by Greg
167 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 222 views