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
227 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,180 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 5, 2019 in Data Analytics by anonymous
9,955 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,660 points
25,242 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
• 32,930 points
625 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,380 points
136 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
325 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,180 points
814 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 13, 2018 in Data Analytics by zombie
• 3,790 points
22,517 views