I have tried to classify company data by using Decision tree But getting an error as Input contains NaN infinity or a value too large for dtype float32

0 votes
Apr 10, 2020 in Data Analytics by Sravanthi
• 180 points
584 views

1 answer to this question.

0 votes

Hi@Sravanthi,

You got this error, because your dataset contains null values. So you can apply feature engineering in your dataset before applying your method. You can use pandas to avoid this.

$ import pandas as pd
$ pd.dropna(variable)

Pass your variable in dropna() function. Then try again.

Hope this will help.

answered Apr 30, 2020 by MD
• 95,440 points

Related Questions In Data Analytics

0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

answered Aug 6, 2019 in Data Analytics by anonymous
13,670 views
0 votes
1 answer
+1 vote
3 answers

How to change the value of a variable using R programming in a data frame?

Try this: df$symbol <- as.character(df$symbol) df$symbol[df$sym ...READ MORE

answered Jan 11, 2019 in Data Analytics by Tyrion anex
• 8,700 points
35,234 views
0 votes
1 answer
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,442 views
0 votes
1 answer

How to apply list to a function which give data frame as output

If you use  tidyverse, you can use ...READ MORE

answered Apr 11, 2018 in Data Analytics by Sahiti
• 6,370 points
465 views
0 votes
1 answer

How to join a list of data frames using map()

You can use reduce set.seed(24) r1 <- map(c(5, 10, ...READ MORE

answered Apr 11, 2018 in Data Analytics by kappa3010
• 2,090 points
1,255 views
+3 votes
1 answer

at model.fit I'm getting an error as : ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

Hi, I think your X parameter contains null ...READ MORE

answered Apr 30, 2020 in Data Analytics by MD
• 95,440 points
2,704 views
+1 vote
2 answers

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

answered Apr 14, 2018 in Data Analytics by zombie
• 3,790 points
28,074 views
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