text_plain_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

dataset = pd.read_csv('../input/the-spotify-hit-predictor-dataset/dataset-of-90s.csv')

features_with_na = [feature for feature in dataset.columns if dataset[feature].isnull().sum() > 1]
features_with_na

dataset.isnull().sum()

numerical_feature = [feature for feature in dataset.columns if dataset[feature].dtypes != 'O']
numerical_feature

discrete_feature = [feature for feature in numerical_feature if len(dataset[feature].unique()) < 15]
discrete_feature

for feature in discrete_feature:
    data = dataset.copy()

continuous_feature = [feature for feature in numerical_feature if feature not in discrete_feature]
continuous_feature

for feature in continuous_feature:
    data = dataset.copy()

for feature in continuous_feature:
    data[feature] = np.log(data[feature])

for feature in continuous_feature:
    data = dataset.copy()
    data[feature] = np.log(data[feature])
    data.boxplot(column=feature)
    plt.ylabel(feature)
    plt.title(feature)
    plt.show()