Issue
I work with data set which is available on this link https://www.kaggle.com/thomaskonstantin/bank-churn-data-exploration-and-churn-prediction. My intention is to make plots for each numerical data. In order to do that I already make code which iterate through columns and make bar plots. You can see code and output from this code below
dataset_num = dataset.select_dtypes(include = ['float64', 'int64'])
dataset_num.head()
dataset_num.hist(figsize=(16, 20), bins=50, xlabelsize=8, ylabelsize=8);
Now I want to make boxplots and also pie chart for each variable on similar way like code above.I try with on this way but obviously I made some mistake.
dataset_num.plot(figsize=(16, 20), kind='box', xlabelsize=8, ylabelsize=8);
So can anybody help me how to solve this and make boxplots and pie charts ?
Solution
This worked for boxplots:
dataset_num.plot(figsize=(16, 20), kind='box', subplots=True, layout=(4, 5))
For pie plots, you will need at least one categorical variable.
Answered By - jjsantoso
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.