I am working around with data from Kaggle : Titanic Competition dataset.
#cols : List of all column header cols = list(df.columns.values) #script to plot histograms of all columns with respect to column: "Survived" for val in cols: df.groupby('Survived')[val].hist(alpha = 0.2)
Code of importance (COI)
df.groupby('Survived')['Age'].hist(alpha = 0.3)
The COI works but the Script is not working. The script will help to plot all the histograms in one go without manually inserting the column in the COI.
- The script is running indefinetly.
- The COI also runs indefinetly but once I execute the following code:
df.groupby('Survived').Age.hist(alpha = 0.2) #This runs flawlessly
COI runs perfectly. (Not able to figure out why).
- The scripts are written in Kaggel Kernel.
Given the above details, please help me figure out a way to achieve the above script either by making improvements to the Script or an alternate way of doing the same.