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, 2019 in Python by anonymous
5,967 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 20, 2019 by Noel Deepak Palle
Thanks. This worked.

Related Questions In Python

0 votes
0 answers

TypeError: 'list' object is not callable in python

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

Feb 3, 2022 in Python by Nandini
• 5,480 points
1,072 views
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,560 points
1,624 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 4,466 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP