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 in Data Analytics by Sravanthi
• 150 points
136 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 by MD
• 23,050 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
6,403 views
0 votes
1 answer
0 votes
2 answers

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

You are getting this error since the ...READ MORE

answered Aug 16, 2019 in Data Analytics by anonymous
• 32,460 points
6,992 views
0 votes
1 answer
0 votes
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,460 points
294 views
0 votes
1 answer
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,080 points
104 views
0 votes
1 answer
0 votes
1 answer

How to create Heatmap for visualizing my dataset?

Hi@akhtar, You have to import seaborn module to ...READ MORE

answered May 4 in Data Analytics by MD
• 23,050 points
123 views